hi,
ehm. Ich möchte dieses register system scripten: [ SCRIPTING ] Login & Register Textdraw basierend.
aber. bei mir funktioniert das nicht errors:
C:\Users\Home\Desktop\[SAR] San Andreas Roleplay\gamemodes\SAR.pwn(78) : error 017: undefined symbol "Textdraw1"
C:\Users\Home\Desktop\[SAR] San Andreas Roleplay\gamemodes\SAR.pwn(79) : error 028: invalid subscript (not an array or too many subscripts): "Textdraw0"
C:\Users\Home\Desktop\[SAR] San Andreas Roleplay\gamemodes\SAR.pwn(79) : warning 215: expression has no effect
C:\Users\Home\Desktop\[SAR] San Andreas Roleplay\gamemodes\SAR.pwn(79) : error 001: expected token: ";", but found "]"
C:\Users\Home\Desktop\[SAR] San Andreas Roleplay\gamemodes\SAR.pwn(79) : error 029: invalid expression, assumed zero
C:\Users\Home\Desktop\[SAR] San Andreas Roleplay\gamemodes\SAR.pwn(79) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Code:
public OnGameModeInit()
{
new Text:Textdraw0;
new Text:Textdraw1;
Textdraw0 = TextDrawCreate(441.555541, 129.428878, "usebox");
TextDrawLetterSize(Textdraw0, 0.000000, 17.326791);
TextDrawTextSize(Textdraw0, 202.000030, 0.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 0);
TextDrawUseBox(Textdraw0, true);
TextDrawBoxColor(Textdraw0, 102);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 0);
TextDrawFont(Textdraw0, 0);
Textdraw1 = TextDrawCreate(419.777770, 157.304443, "usebox");
TextDrawLetterSize(Textdraw1, 0.000000, 11.187531);
TextDrawTextSize(Textdraw1, 224.222229, 0.000000);
TextDrawAlignment(Textdraw1, 1);
TextDrawColor(Textdraw1, 0);
TextDrawUseBox(Textdraw1, true);
TextDrawBoxColor(Textdraw1, -16776961);
TextDrawSetShadow(Textdraw1, 0);
TextDrawSetOutline(Textdraw1, 0);
TextDrawFont(Textdraw1, 0);
return 1;
}
public OnPlayerConnect(playerid)
{
new Text:Textdraw0;
SelectTextDraw(playerid, 0x00FF00FF);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
PlayerTextDrawShow(playerid,Textdraw0[playerid]);
new PlayerText:Textdraw0[MAX_PLAYERS];
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 245.777847, 198.115524, "Login oder Register");
PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw0[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw0[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw0[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw0[playerid], 1);
PlayerTextDrawSetSelectable(playerid, Textdraw0[playerid], true);
return 1;
}
OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(playertextid==Textdraw0[playerid])// Also wenn playertextid TextDraw0 ist dann ....
{
//Hier wird dann der Dialog zum Register und Login gezeigt ich mach das jetzt auf dini...
new Datei[64];
format(Datei,sizeof(Datei),"/Acc/%s.txt",SpielerName(playerid));
if(dini_Exists(Datei))
{
ShowPlayerDialog(playerid,DIA_LOG,DIALOG_STYLE_PASSWORD,"Login","Insert you own Password to login","Login","Cancel");
}
else
{
ShowPlayerDialog(playerid,DIA_REG,DIALOG_STYLE_PASSWORD,"Register","Insert a Password to Register","Register","Cancel");
}
return 1;
}
return 1;
}
Bitte hilft mir
MfG