06.04.2014, 00:17
pawn Code:
public OnPlayerSpawn(playerid)
{
if(MoneyGiven[playerid] != -1)
{
GivePlayerMoney(playerid, MoneyGiven[playerid]);
MoneyGiven[playerid] = -1;
}
if(JustLogged[playerid] == 1)
{
new s[64];
format(s,64,"Welcome back! We hope you enjoy.",GetName(playerid));
SendClientMessage(playerid,COLOR_GREEN,s);
JustLogged[playerid] = 0;
if(gTeam[playerid] >= 9) {
new rnd;
rnd = random(sizeof (SpawnPoints));
SetPlayerPos(playerid, SpawnPoints[rnd][0], SpawnPoints[rnd][1], SpawnPoints[rnd][2]);
SetPlayerFacingAngle(playerid, SpawnPoints[rnd][3]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}