Default team new account - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Default team new account (
/showthread.php?tid=526775)
Default team new account -
prooftzm - 19.07.2014
Hi all there. I made a gang wars server, with two teams. team 0 and team 1.
When I login to the server with a new account, I automatically sets the team 0, when in fact it should have no team. How could I do to set the team's 255 (no team) if the player is new?
Re: Default team new account -
KayJ - 19.07.2014
Are we meant to guess your code?
Re: Default team new account -
prooftzm - 19.07.2014
ok ok. edit:
pawn Код:
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Registering...","Type your password below to register a new account.","Register","Quit");
}
GangZoneShowForAll(Zone1,COLOR_RED);
GangZoneShowForAll(Zone2,0x000050);
TextDrawShowForPlayer(playerid, SVname);
if(PlayerInfo[playerid] [pTeam] == 255)
{
ShowPlayerDialog(playerid, DIALOG_GANGCHANGE, DIALOG_STYLE_LIST, "Selecteaza-ti noul gang","{FF0000}Red Dragon Triad\n{808080}The Corleone Family", "Schimba", "Anuleaza");
}
SetPlayerTeam(playerid, 255);
return 1;
}