[HELP]OnPlayerSpawn - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]OnPlayerSpawn (
/showthread.php?tid=101488)
[HELP]OnPlayerSpawn -
[NYRP]Mike. - 10.10.2009
Hey Guys, i'm back again, Anyone possably help me here.
pawn Код:
public OnPlayerSpawn(playerid)
{
if(TEAM_COP[playerid] == 1)
{
SetPlayerColor(playerid, COLOR_BLUE);
SetPlayerPos(playerid, 3410.4294,-1786.3250,491.7417);
FreezePlayer(playerid, 2500);
SendClientMessage(playerid, COLOR_YELLOW, " You have spawned as a Cop! (/Objective)");
SetPlayerInterior(playerid, 1);
CopKeys(playerid);
TEAM_COPKeys[playerid] = 1;
AccountInfo[playerid][pMember] = 1;
TextDrawShowForPlayer(playerid, Text:Textdraw0);
TextDrawShowForPlayer(playerid, Text:Textdraw1);
TextDrawShowForPlayer(playerid, Text:Textdraw4);
return 1;
}
if(TEAM_PRIS[playerid] == 1)
{
SetPlayerColor(playerid, ORANGE);
SetPlayerPos(playerid, 3410.4294,-1786.3250,491.7417);
FreezePlayer(playerid, 2500);
SendClientMessage(playerid, COLOR_YELLOW, " You have spawned as a Prisoner! (/Objective)");
SetPlayerInterior(playerid, 1);
CopKeys(playerid);
AccountInfo[playerid][pMember] = 2;
TEAM_COPKeys[playerid] = 0;
TextDrawShowForPlayer(playerid, Text:Textdraw0);
TextDrawShowForPlayer(playerid, Text:Textdraw1);
TextDrawShowForPlayer(playerid, Text:Textdraw4);
}
if(AccountInfo[playerid][AdminLevel] >= 5)
{
Hide[playerid] = 1;
}
if(AccountInfo[playerid][Donator] == 1)
{
SetPlayerColor(playerid, COLOR_GREEN);
SetPlayerPos(playerid, 3440.648438, -1807.368042, 470.532043);
FreezePlayer(playerid, 2500);
SendClientMessage(playerid, COLOR_YELLOW, " You have Spawned as a Donator!");
SetPlayerInterior(playerid, 1);
}
else if(AccountInfo[playerid][Logged] == 0)
{
AccountInfo[playerid][SJail] = 1;
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid, 264.3700,77.5700,1001.0391);
SetPlayerFacingAngle(playerid, 272.6900);
}
return 1;
}
Thanks.
-Mike.
Re: [HELP]OnPlayerSpawn -
FreshKilla - 10.10.2009
If theres a problem with not reading the other Functions as you can see:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(TEAM_COP[playerid] == 1)
{
SetPlayerColor(playerid, COLOR_BLUE);
SetPlayerPos(playerid, 3410.4294,-1786.3250,491.7417);
FreezePlayer(playerid, 2500);
SendClientMessage(playerid, COLOR_YELLOW, " You have spawned as a Cop! (/Objective)");
SetPlayerInterior(playerid, 1);
CopKeys(playerid);
TEAM_COPKeys[playerid] = 1;
AccountInfo[playerid][pMember] = 1;
TextDrawShowForPlayer(playerid, Text:Textdraw0);
TextDrawShowForPlayer(playerid, Text:Textdraw1);
TextDrawShowForPlayer(playerid, Text:Textdraw4);
return 1;
}
I beleive it has a return 1; Which basicly will not call anything else and just call that function, So if you want the other functions called too, You should remove Return 1;