05.08.2015, 18:26
Hey guys i need help where i leave the server and when i connect again i spawn at the same place instead of the place in the random spawn positions i run a CNR server.
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) { SetPlayerColor(playerid, WHITE); SetPlayerSkin(playerid, 84); }
PreloadAnimationLibrary(playerid, "GRAVEYARD");
PreloadAnimationLibrary(playerid, "RAPPING");
PreloadAnimationLibrary(playerid, "PED");
PreloadAnimationLibrary(playerid, "FOOD");
PreloadAnimationLibrary(playerid, "SWEET");
PreloadAnimationLibrary(playerid, "ON_LOOKERS");
PreloadAnimationLibrary(playerid, "DEALER");
PreloadAnimationLibrary(playerid, "CRACK");
PreloadAnimationLibrary(playerid, "SMOKING");
PreloadAnimationLibrary(playerid, "BEACH");
PreloadAnimationLibrary(playerid, "PARK");
verifydestroycar{playerid} = 0;
LoadFightStyle(playerid);
StartCheckpointSeeking();
HasSpawned{playerid} = true;
HasShieldAttached{playerid} = false;
HasBandanaAttached{playerid} = false;
IsPlayerUsingAnim{playerid} = false;
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
IsInGod{playerid} = 0;
IsInGodCar{playerid} = 0;
/*if(GetPVarInt(playerid, "FirstSpawn") == 0)
{
SetTimerEx("HouseSpawning", 1000, false, "i", playerid);
}*/
if(IsAdminSpectating{playerid} == true)
{
IsAdminSpectating{playerid} = false;
SpecInfo[playerid][IsSpectating] = -1;
}
if(HasPlayerDiedInJail{playerid} == true && GetTeam{playerid} == CLASS_CIV)
{
SendPlayerToJail(playerid);
return 1;
}
if(HasPlayerDiedInCage{playerid} == true && CageTime[playerid] > 0)
{
new time = CageTime[playerid];
IsPlayersFirstSpawn{playerid} = false;
ResetPlayerWeapons(playerid);
SetPlayerWantedLevel(playerid, 0);
SetPlayerPos(playerid, 2178.3713, 2407.2861, 73.0339);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
IsCaged{playerid} = true;
SetPlayerArmour(playerid, 0);
GameTextForPlayer(playerid,"~r~Caged!", 5000, 5);
if(CageTime[playerid] > 0)
{
CageTime[playerid] = 0;
}
CageTime[playerid] = time;
KillTimer(JailTimer[playerid]);
KillTimer(CageTimer[playerid]);
CageTimer[playerid] = SetTimerEx("AutoUncage", 1000, true, "%d", playerid);
return 1;
}
if(IsPlayersFirstSpawn{playerid} == true)
{
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWanted]);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot0_gun], GunInfo[playerid][gSlot0_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot1_gun], GunInfo[playerid][gSlot1_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot2_gun], GunInfo[playerid][gSlot2_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot3_gun], GunInfo[playerid][gSlot3_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot4_gun], GunInfo[playerid][gSlot4_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot5_gun], GunInfo[playerid][gSlot5_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot6_gun], GunInfo[playerid][gSlot6_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot7_gun], GunInfo[playerid][gSlot7_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot8_gun], GunInfo[playerid][gSlot8_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot9_gun], GunInfo[playerid][gSlot9_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot10_gun], GunInfo[playerid][gSlot10_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot11_gun], GunInfo[playerid][gSlot11_ammo]);
GivePlayerWeapon(playerid, GunInfo[playerid][gSlot12_gun], GunInfo[playerid][gSlot12_ammo]);
SetPlayerPos(playerid, PosInfo[playerid][rPos_X], PosInfo[playerid][rPos_Y], PosInfo[playerid][rPos_Z]);
SetPlayerFacingAngle(playerid, PosInfo[playerid][rPos_A]);
SetPlayerInterior(playerid, PosInfo[playerid][rInterior]);
SetPlayerVirtualWorld(playerid, PosInfo[playerid][rWorld]);
}
if(IsPlayersFirstSpawn{playerid} == true)
{
if(PlayerInfo[playerid][cTime] > 0)
{
new time = PlayerInfo[playerid][cTime];
IsPlayersFirstSpawn{playerid} = false;
ResetPlayerWeapons(playerid);
SetPlayerWantedLevel(playerid, 0);
SetPlayerPos(playerid, 2178.3713, 2407.2861, 73.0339);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
IsCaged{playerid} = true;
SetPlayerArmour(playerid, 0);
GameTextForPlayer(playerid,"~r~Caged!", 5000, 5);
if(CageTime[playerid] > 0)
{
CageTime[playerid] = 0;
}
CageTime[playerid] = time;
KillTimer(JailTimer[playerid]);
KillTimer(CageTimer[playerid]);
CageTimer[playerid] = SetTimerEx("AutoUncage", 1000, true, "%d", playerid);
}
return 1;
}
//
if(IsPlayersFirstSpawn{playerid} == true && GetTeam{playerid} == CLASS_CIV && PlayerInfo[playerid][jTime] > 0)
{
IsPlayersFirstSpawn{playerid} = false;
new cell = random(6);
if(cell == 0)
{
new time = PlayerInfo[playerid][jTime];
new inmateid = random(100000) + random(123456);
InMateID[playerid] = inmateid;
IsJailed{playerid} = true;
IsInCell{playerid} = 1;//
GoToJail{playerid} = false;
JailTime[playerid] = time;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 0.0);
SetPlayerColor(playerid, WHITE);
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 198.0651, 176.7253, 1003.0234);//
SetPlayerFacingAngle(playerid, 359.4248);//
TogglePlayerControllable(playerid, true);
HasBeenArrested{playerid} = false;
new string[150];
format(string, sizeof(string), "Welcome to NVPD jail cell (1), you have been incarcerated for %d seconds.", time);
SendClientMessage(playerid, RED, string);
SendClientMessage(playerid, WHITE, "Try /(esc)ape or get someone to /break or /bail you out.");
KillTimer(JailTimer[playerid]);
JailTimer[playerid] = SetTimerEx("AutoUnjail", 1000, true, "%d", playerid);
return 1;
}
else if(cell == 1)
{
new time = PlayerInfo[playerid][jTime];
new inmateid = random(100000) + random(123456);
InMateID[playerid] = inmateid;
IsJailed{playerid} = true;
IsInCell{playerid} = 2;//
GoToJail{playerid} = false;
JailTime[playerid] = time;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 0.0);
SetPlayerColor(playerid, WHITE);
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 193.8369, 176.7251, 1003.0234);//
SetPlayerFacingAngle(playerid, 0.6781);//
TogglePlayerControllable(playerid, true);
HasBeenArrested{playerid} = false;
new string[150];
format(string, sizeof(string), "Welcome to NVPD jail cell (2), you have been incarcerated for %d seconds.", time);
SendClientMessage(playerid, RED, string);
SendClientMessage(playerid, WHITE, "Try /(esc)ape or get someone to /break or /bail you out.");
KillTimer(JailTimer[playerid]);
JailTimer[playerid] = SetTimerEx("AutoUnjail", 1000, true, "%d", playerid);
return 1;
}
else if(cell == 2)
{
new time = PlayerInfo[playerid][jTime];
new inmateid = random(100000) + random(123456);
InMateID[playerid] = inmateid;
IsJailed{playerid} = true;
IsInCell{playerid} = 3;//
GoToJail{playerid} = false;
JailTime[playerid] = time;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 0.0);
SetPlayerColor(playerid, WHITE);
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 189.5884, 176.7243, 1003.1533);//
SetPlayerFacingAngle(playerid, 357.5681);//
TogglePlayerControllable(playerid, true);
HasBeenArrested{playerid} = false;
new string[150];
format(string, sizeof(string), "Welcome to NVPD jail cell (3), you have been incarcerated for %d seconds.", time);
SendClientMessage(playerid, RED, string);
SendClientMessage(playerid, WHITE, "Try /(esc)ape or get someone to /break or /bail you out.");
KillTimer(JailTimer[playerid]);
JailTimer[playerid] = SetTimerEx("AutoUnjail", 1000, true, "%d", playerid);
return 1;
}
else if(cell == 3)
{
new time = PlayerInfo[playerid][jTime];
new inmateid = random(100000) + random(123456);
InMateID[playerid] = inmateid;
IsJailed{playerid} = true;
IsInCell{playerid} = 4;//
GoToJail{playerid} = false;
JailTime[playerid] = time;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 0.0);
SetPlayerColor(playerid, WHITE);
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 198.0573, 160.6476, 1003.1533);//
SetPlayerFacingAngle(playerid, 178.6532);//
TogglePlayerControllable(playerid, true);
HasBeenArrested{playerid} = false;
new string[150];
format(string, sizeof(string), "Welcome to NVPD jail cell (4), you have been incarcerated for %d seconds.", time);
SendClientMessage(playerid, RED, string);
SendClientMessage(playerid, WHITE, "Try /(esc)ape or get someone to /break or /bail you out.");
KillTimer(JailTimer[playerid]);
JailTimer[playerid] = SetTimerEx("AutoUnjail", 1000, true, "%d", playerid);
return 1;
}
else if(cell == 4)
{
new time = PlayerInfo[playerid][jTime];
new inmateid = random(100000) + random(123456);
InMateID[playerid] = inmateid;
IsJailed{playerid} = true;
IsInCell{playerid} = 5;//
GoToJail{playerid} = false;
JailTime[playerid] = time;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 0.0);
SetPlayerColor(playerid, WHITE);
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 193.8127, 160.6480, 1003.1533);//
SetPlayerFacingAngle(playerid, 178.0266);//
TogglePlayerControllable(playerid, true);
HasBeenArrested{playerid} = false;
new string[150];
format(string, sizeof(string), "Welcome to NVPD jail cell (5), you have been incarcerated for %d seconds.", time);
SendClientMessage(playerid, RED, string);
SendClientMessage(playerid, WHITE, "Try /(esc)ape or get someone to /break or /bail you out.");
KillTimer(JailTimer[playerid]);
JailTimer[playerid] = SetTimerEx("AutoUnjail", 1000, true, "%d", playerid);
return 1;
}
else if(cell == 5)
{
new time = PlayerInfo[playerid][jTime];
new inmateid = random(100000) + random(123456);
InMateID[playerid] = inmateid;
IsJailed{playerid} = true;
IsInCell{playerid} = 6;//
GoToJail{playerid} = false;
JailTime[playerid] = time;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 0.0);
SetPlayerColor(playerid, WHITE);
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 189.5607, 160.6474, 1003.1533);//
SetPlayerFacingAngle(playerid, 180.1966);//
TogglePlayerControllable(playerid, true);
HasBeenArrested{playerid} = false;
new string[150];
format(string, sizeof(string), "Welcome to NVPD jail cell (6), you have been incarcerated for %d seconds.", time);
SendClientMessage(playerid, RED, string);
SendClientMessage(playerid, WHITE, "Try /(esc)ape or get someone to /break or /bail you out.");
KillTimer(JailTimer[playerid]);
JailTimer[playerid] = SetTimerEx("AutoUnjail", 1000, true, "%d", playerid);
}
return 1;
}
//
if(GoToJail{playerid} == true && GetTeam{playerid} == CLASS_CIV)
{
SendPlayerToJail(playerid);
return 1;
}
if(HasDied{playerid} == true)
{
new rand = random(sizeof(MedicSpawns));
SetPlayerPos(playerid, MedicSpawns[rand][0], MedicSpawns[rand][1], MedicSpawns[rand][2]);
SetPlayerFacingAngle(playerid, MedicSpawns[rand][3]);
HasDied{playerid} = false;
if(GetTeam{playerid} == CLASS_COPS)
{
SetPlayerWantedLevel(playerid, 0);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
}
else if(GetTeam{playerid} == CLASS_CIA)
{
SetPlayerWantedLevel(playerid, 0);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
}
else if(GetTeam{playerid} == CLASS_SWAT)
{
SetPlayerWantedLevel(playerid, 0);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
}
else if(GetTeam{playerid} == CLASS_ARMY)
{
SetPlayerWantedLevel(playerid, 0);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
}
else if(GetTeam{playerid} == CLASS_MEDIC)
{
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
}
else if(GetTeam{playerid} == CLASS_CIV)
{
SetPlayerWantedLevel(playerid, 0);
if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
}
}
if(GetTeam{playerid} == CLASS_COPS)
{
ShowPlayerDialog(playerid, COP_MSG, DIALOG_STYLE_MSGBOX , "{FFFFFF}New Vegas Police",
"{FFFFFF}Your a police officer, your job is to arrest(/ar) and takedown\nwanted criminals(/pc) and ticket(/tk) suspect civilians(/pc).\nYou can also /taze(/tz) and /cuff(/cf) wanted criminals and you\ncan /bail out prisoners or take a /bribe from wanted criminals.\nUse /c [msg] for [Cop Radio]\n\nUse /faqs for the list of frequently asked questions and /cmds\nfor a list of available commands. Use /askadmin for admin help\nor use /n for helper assistance.", "Ok", "");
}
else if(GetTeam{playerid} == CLASS_CIA)
{
ShowPlayerDialog(playerid, CIA_MSG, DIALOG_STYLE_MSGBOX , "{FFFFFF}New Vegas CIA",
"{FFFFFF}Your a undercover cia agent, your job is to focus on and takedown\nmost wanted criminals(/pc) undetected using your stealth tactics.\nYou can also /taze(/tz) and /cuff(/cf) wanted criminals and you\ncan /bail out prisoners or take a /bribe from wanted criminals.\nUse /c [msg] for [Cop Radio]\n\nUse /faqs for the list of frequently asked questions and /cmds\nfor a list of available commands. Use /askadmin for admin help\nor use /n for helper assistance.", "Ok", "");
}
else if(GetTeam{playerid} == CLASS_SWAT)
{
ShowPlayerDialog(playerid, SWAT_MSG, DIALOG_STYLE_MSGBOX , "{FFFFFF}SWAT",
"{FFFFFF}Your a SWAT Official, your job is to focus on and takedown\nmost wanted criminals(/pc) undetected using your stealth tactics.\nYou can also /taze(/tz) and /cuff(/cf) wanted criminals and you\ncan /bail out prisoners or take a /bribe from wanted criminals.\nUse /c [msg] for [Cop Radio]\n\nUse /faqs for the list of frequently asked questions and /cmds\nfor a list of available commands. Use /askadmin for admin help\nor use /n for helper assistance.", "Ok", "");
}
else if(GetTeam{playerid} == CLASS_CIV)
{
ShowPlayerDialog(playerid, CIV_MSG, DIALOG_STYLE_MSGBOX , "{FFFFFF}Civilian",
"{FFFFFF}Your a civilian(robber), your job is to rob players, casinos,\nbanks, stores and businesses while trying to avoid arrest from\nlaw enforcement. If you get arrested or taken down you are then\nsent to jail for 3-4 mins, which you can either /escape or get a\nfriend to /break or /bail you out.\n\nUse /faqs for the list of frequently asked questions and /cmds\nfor a list of available commands. Use /askadmin for admin help\nor use /n for helper assistance.", "Ok", "");
}
else if(GetTeam{playerid} == CLASS_MEDIC)
{
ShowPlayerDialog(playerid, MEDIC_MSG, DIALOG_STYLE_MSGBOX , "{FFFFFF}Medic",
"{FFFFFF}Your a medic, your job is to assist members of New Vegas with\ninjuries using /medic, they can also /callmedic to call for help.\nUse /m [msg] for [Medic Radio]\n\nUse /faqs for the list of frequently asked questions and /cmds\nfor a list of available commands. Use /askadmin for admin help\nor use /n for helper assistance.", "Ok", "");
}
else if(GetTeam{playerid} == CLASS_ARMY)
{
ShowPlayerDialog(playerid, ARMY_MSG, DIALOG_STYLE_MSGBOX , "{FFFFFF}New Vegas Army",
"{FFFFFF}Your a army soldier, your job is to focus on and takedown most\nwanted criminals(/pc) at all costs using army supplied vehicles.\nYou can also /taze(/tz) and /cuff(/cf) wanted criminals and you\ncan /bail out prisoners or take a /bribe from wanted criminals.\nUse /c [msg] for [Cop Radio]\n\nUse /faqs for the list of frequently asked questions and /cmds\nfor a list of available commands. Use /askadmin for admin help\nor use /n for helper assistance.", "Ok", "");
}
if(HasDied{playerid} == false && GetTeam{playerid} == CLASS_COPS)
{
SetPlayerWantedLevel(playerid, 0);
SetPlayerColor(playerid,Blue);
new rand = random(sizeof(CopSpawns));
SetPlayerPos(playerid, CopSpawns[rand][0], CopSpawns[rand][1], CopSpawns[rand][2]);
SetPlayerFacingAngle(playerid, CopSpawns[rand][3]);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
}
else if(HasDied{playerid} == false && GetTeam{playerid} == CLASS_CIA)
{
SetPlayerWantedLevel(playerid, 0);
SetPlayerColor(playerid, WHITE);
new rand = random(sizeof(CIASpawns));
SetPlayerPos(playerid, CIASpawns[rand][0], CIASpawns[rand][1], CIASpawns[rand][2]);
SetPlayerFacingAngle(playerid, CIASpawns[rand][3]);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
}
else if(HasDied{playerid} == false && GetTeam{playerid} == CLASS_SWAT)
{
SetPlayerWantedLevel(playerid, 0);
SetPlayerColor(playerid, WHITE);
new rand = random(sizeof(SWATSpawns));
SetPlayerPos(playerid, SWATSpawns[rand][0] + 2.0, SWATSpawns[rand][1], SWATSpawns[rand][2]);
SetPlayerFacingAngle(playerid, SWATSpawns[rand][3]);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
}
else if(HasDied{playerid} == false && GetTeam{playerid} == CLASS_CIV)
{
SetPlayerColor(playerid,WHITE);
new rand = random(sizeof(CivSpawns));
SetPlayerPos(playerid, CivSpawns[rand][0], CivSpawns[rand][1], CivSpawns[rand][2]);
SetPlayerFacingAngle(playerid, CivSpawns[rand][3]);
}
else if(HasDied{playerid} == false && GetTeam{playerid} == CLASS_MEDIC)
{
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid,PINK);
new rand = random(sizeof(MedicSpawns));
SetPlayerPos(playerid, MedicSpawns[rand][0], MedicSpawns[rand][1], MedicSpawns[rand][2]);
SetPlayerFacingAngle(playerid, MedicSpawns[rand][3]);
}
else if(HasDied{playerid} == false && GetTeam{playerid} == CLASS_ARMY)
{
SetPlayerWantedLevel(playerid, 0);
SetPlayerColor(playerid,GREEN);
new rand = random(sizeof(ArmySpawns));
SetPlayerPos(playerid, ArmySpawns[rand][0], ArmySpawns[rand][1], ArmySpawns[rand][2]);
SetPlayerFacingAngle(playerid, ArmySpawns[rand][3]);
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
SetPlayerAttachedObject(playerid, 1 , 18637, 1, 0, -0.1, 0.18, 90, 0, 272, 1, 1, 1);
}
if(IsUnfairDeath{playerid} == true)
{
IsUnfairDeath{playerid} = false;
GameTextForPlayer(playerid, "~g~Unfair ~r~Death.",3000,5);
SendClientMessage(playerid, YELLOW, "Unfair death. Continuing current life...");
}
if(IsPlayerConnected(playerid) && IsLoggedIn{playerid} == 1)
{
SaveBankStats(playerid);
SaveFightStats(playerid);
SaveUserStats(playerid);
SaveDegreeStats(playerid);
}
IsPlayersFirstSpawn{playerid} = true;
return 1;
}
2517.2141,2304.2932,10.8203,354.8948
OnPlayerSpawn pъblica (playerid)
{
if (IsPlayerNPC (playerid)) {SetPlayerColor (playerid, BRANCO); SetPlayerSkin (playerid, 84); }
PreloadAnimationLibrary (playerid, "cemitйrio");
PreloadAnimationLibrary (playerid, "rap");
PreloadAnimationLibrary (playerid, "PED");
PreloadAnimationLibrary (playerid, "alimento");
PreloadAnimationLibrary (playerid, "doce");
PreloadAnimationLibrary (playerid, ON_LOOKERS "");
PreloadAnimationLibrary (playerid, "dealer");
PreloadAnimationLibrary (playerid, "crack");
PreloadAnimationLibrary (playerid, "fumar");
PreloadAnimationLibrary (playerid, "Praia");
PreloadAnimationLibrary (playerid, "PARK");
verifydestroycar {playerid} = 0;
LoadFightStyle (playerid);
StartCheckpointSeeking ();
HasSpawned {} playerid = true;
HasShieldAttached {} playerid = false;
HasBandanaAttached {} playerid = false;
IsPlayerUsingAnim {} playerid = false;
ClearAnimations (playerid);
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
IsInGod {playerid} = 0;
IsInGodCar {playerid} = 0;
/ * If (GetPVarInt (playerid, "FirstSpawn") == 0)
{
SetTimerEx ("HouseSpawning", 1000, falso, "i", playerid);
} * /
if (IsAdminSpectating {playerid} == true)
{
IsAdminSpectating {} playerid = false;
SpecInfo [playerid] [IsSpectating] = -1;
}
if (HasPlayerDiedInJail {playerid} == verdadeiro && GetTeam {playerid} == CLASS_CIV)
{
SendPlayerToJail (playerid);
return 1;
}
if (HasPlayerDiedInCage {playerid} == verdadeiro && CageTime [playerid]> 0)
{
novo tempo = CageTime [playerid];
IsPlayersFirstSpawn {} playerid = false;
ResetPlayerWeapons (playerid);
SetPlayerWantedLevel (playerid, 0);
SetPlayerInterior (playerid, 0);
SetPlayerVirtualWorld (playerid, 0);
IsCaged {} playerid = true;
SetPlayerArmour (playerid, 0);
GameTextForPlayer (playerid, "~ r ~ Caged!", 5000, 5);
if (CageTime [playerid]> 0)
{
CageTime [playerid] = 0;
}
CageTime [playerid] = tempo;
KillTimer (JailTimer [playerid]);
KillTimer (CageTimer [playerid]);
CageTimer [playerid] = SetTimerEx ("AutoUncage", 1000, verdadeiro, "% d", playerid);
return 1;
}
if (IsPlayersFirstSpawn {playerid} == true)
{
SetPlayerHealth (playerid, PlayerInfo [playerid] [pHealth]);
SetPlayerArmour (playerid, PlayerInfo [playerid] [pArmour]);
SetPlayerWantedLevel (playerid, PlayerInfo [playerid] [pWanted]);
ResetPlayerWeapons (playerid);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot0_gun], GunInfo [playerid] [gSlot0_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot1_gun], GunInfo [playerid] [gSlot1_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot2_gun], GunInfo [playerid] [gSlot2_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot3_gun], GunInfo [playerid] [gSlot3_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot4_gun], GunInfo [playerid] [gSlot4_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot5_gun], GunInfo [playerid] [gSlot5_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot6_gun], GunInfo [playerid] [gSlot6_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot7_gun], GunInfo [playerid] [gSlot7_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot8_gun], GunInfo [playerid] [gSlot8_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot9_gun], GunInfo [playerid] [gSlot9_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot10_gun], GunInfo [playerid] [gSlot10_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot11_gun], GunInfo [playerid] [gSlot11_ammo]);
GivePlayerWeapon (playerid, GunInfo [playerid] [gSlot12_gun], GunInfo [playerid] [gSlot12_ammo]);
/*SetPlayerPos (playerid, PosInfo [playerid] [rPos_X], PosInfo [playerid] [rPos_Y], PosInfo [playerid] [rPos_Z]);
SetPlayerFacingAngle (playerid, PosInfo [playerid] [rPos_A]);
SetPlayerInterior (playerid, PosInfo [playerid] [rInterior]);
SetPlayerVirtualWorld (playerid, PosInfo [playerid] [RWORLD]);*/
}
if (IsPlayersFirstSpawn {playerid} == true)
{
if (PlayerInfo [playerid] [CTIME]> 0)
{
novo tempo = PlayerInfo [playerid] [CTIME];
IsPlayersFirstSpawn {} playerid = false;
ResetPlayerWeapons (playerid);
SetPlayerWantedLevel (playerid, 0);
SetPlayerInterior (playerid, 0);
SetPlayerVirtualWorld (playerid, 0);
IsCaged {} playerid = true;
SetPlayerArmour (playerid, 0);
GameTextForPlayer (playerid, "~ r ~ Caged!", 5000, 5);
if (CageTime [playerid]> 0)
{
CageTime [playerid] = 0;
}
CageTime [playerid] = tempo;
KillTimer (JailTimer [playerid]);
KillTimer (CageTimer [playerid]);
CageTimer [playerid] = SetTimerEx ("AutoUncage", 1000, verdadeiro, "% d", playerid);
}
return 1;
}
//
if (IsPlayersFirstSpawn {playerid} == verdadeiro && GetTeam {playerid} == CLASS_CIV && PlayerInfo [playerid] [jTime]> 0)
{
IsPlayersFirstSpawn {} playerid = false;
nova cйlula = random (6);
se (cйlulas == 0)
{
novo tempo = PlayerInfo [playerid] [jTime];
nova inmateid = random (100000) + aleatуrio (123.456);
InMateID [playerid] = inmateid;
IsJailed {} playerid = true;
IsInCell {playerid} = 1; //
GoToJail {} playerid = false;
Jailtime [playerid] = tempo;
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior (playerid, 3);
SetPlayerVirtualWorld (playerid, 0);
SetPlayerHealth (playerid, 100,0);
SetPlayerArmour (playerid, 0,0);
SetPlayerColor (playerid, BRANCO);
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid); //
TogglePlayerControllable (playerid, true);
HasBeenArrested {} playerid = false;
nova string [150];
formato (string, sizeof (string), "Welcome to NVPD cela de prisгo (1), vocк foi preso por% d segundos.", tempo);
SendClientMessage (playerid, vermelho, string);
SendClientMessage (playerid, BRANCO, "Try / (esc) macaco ou arranjar alguйm para / break / ou salvб-lo.");
KillTimer (JailTimer [playerid]);
JailTimer [playerid] = SetTimerEx ("AutoUnjail", 1000, verdadeiro, "% d", playerid);
return 1;
}
else if (== cйlula 1)
{
novo tempo = PlayerInfo [playerid] [jTime];
nova inmateid = random (100000) + aleatуrio (123.456);
InMateID [playerid] = inmateid;
IsJailed {} playerid = true;
IsInCell {} playerid = 2; //
GoToJail {} playerid = false;
Jailtime [playerid] = tempo;
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior (playerid, 3);
SetPlayerVirtualWorld (playerid, 0);
SetPlayerHealth (playerid, 100,0);
SetPlayerArmour (playerid, 0,0);
SetPlayerColor (playerid, BRANCO);
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid);
TogglePlayerControllable (playerid, true);
HasBeenArrested {} playerid = false;
nova string [150];
formato (string, sizeof (string), "Welcome to NVPD cela de prisгo (2), vocк foi preso por% d segundos.", tempo);
SendClientMessage (playerid, vermelho, string);
SendClientMessage (playerid, BRANCO, "Try / (esc) macaco ou arranjar alguйm para / break / ou salvб-lo.");
KillTimer (JailTimer [playerid]);
JailTimer [playerid] = SetTimerEx ("AutoUnjail", 1000, verdadeiro, "% d", playerid);
return 1;
}
else if (== celular 2)
{
novo tempo = PlayerInfo [playerid] [jTime];
nova inmateid = random (100000) + aleatуrio (123.456);
InMateID [playerid] = inmateid;
IsJailed {} playerid = true;
IsInCell {} playerid = 3; //
GoToJail {} playerid = false;
Jailtime [playerid] = tempo;
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior (playerid, 3);
SetPlayerVirtualWorld (playerid, 0);
SetPlayerHealth (playerid, 100,0);
SetPlayerArmour (playerid, 0,0);
SetPlayerColor (playerid, BRANCO);
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid);
TogglePlayerControllable (playerid, true);
HasBeenArrested {} playerid = false;
nova string [150];
formato (string, sizeof (string), "Welcome to NVPD cela (3), vocк foi preso por% d segundos.", tempo);
SendClientMessage (playerid, vermelho, string);
SendClientMessage (playerid, BRANCO, "Try / (esc) macaco ou arranjar alguйm para / break / ou salvб-lo.");
KillTimer (JailTimer [playerid]);
JailTimer [playerid] = SetTimerEx ("AutoUnjail", 1000, verdadeiro, "% d", playerid);
return 1;
}
else if (== cйlula 3)
{
novo tempo = PlayerInfo [playerid] [jTime];
nova inmateid = random (100000) + aleatуrio (123.456);
InMateID [playerid] = inmateid;
IsJailed {} playerid = true;
IsInCell {} playerid = 4; //
GoToJail {} playerid = false;
Jailtime [playerid] = tempo;
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior (playerid, 3);
SetPlayerVirtualWorld (playerid, 0);
SetPlayerHealth (playerid, 100,0);
SetPlayerArmour (playerid, 0,0);
SetPlayerColor (playerid, BRANCO);
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid);
TogglePlayerControllable (playerid, true);
HasBeenArrested {} playerid = false;
nova string [150];
formato (string, sizeof (string), "Welcome to NVPD cela (4), vocк foi preso por% d segundos.", tempo);
SendClientMessage (playerid, vermelho, string);
SendClientMessage (playerid, BRANCO, "Try / (esc) macaco ou arranjar alguйm para / break / ou salvб-lo.");
KillTimer (JailTimer [playerid]);
JailTimer [playerid] = SetTimerEx ("AutoUnjail", 1000, verdadeiro, "% d", playerid);
return 1;
}
else if (== cйlula 4)
{
novo tempo = PlayerInfo [playerid] [jTime];
nova inmateid = random (100000) + aleatуrio (123.456);
InMateID [playerid] = inmateid;
IsJailed {} playerid = true;
IsInCell {} playerid = 5; //
GoToJail {} playerid = false;
Jailtime [playerid] = tempo;
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior (playerid, 3);
SetPlayerVirtualWorld (playerid, 0);
SetPlayerHealth (playerid, 100,0);
SetPlayerArmour (playerid, 0,0);
SetPlayerColor (playerid, BRANCO);
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid);
TogglePlayerControllable (playerid, true);
HasBeenArrested {} playerid = false;
nova string [150];
formato (string, sizeof (string), "Welcome to NVPD cela de prisгo (5), vocк foi preso por% d segundos.", tempo);
SendClientMessage (playerid, vermelho, string);
SendClientMessage (playerid, BRANCO, "Try / (esc) macaco ou arranjar alguйm para / break / ou salvб-lo.");
KillTimer (JailTimer [playerid]);
JailTimer [playerid] = SetTimerEx ("AutoUnjail", 1000, verdadeiro, "% d", playerid);
return 1;
}
else if (== cйlula 5)
{
novo tempo = PlayerInfo [playerid] [jTime];
nova inmateid = random (100000) + aleatуrio (123.456);
InMateID [playerid] = inmateid;
IsJailed {} playerid = true;
IsInCell {} playerid = 6; //
GoToJail {} playerid = false;
Jailtime [playerid] = tempo;
SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
SetPlayerInterior (playerid, 3);
SetPlayerVirtualWorld (playerid, 0);
SetPlayerHealth (playerid, 100,0);
SetPlayerArmour (playerid, 0,0);
SetPlayerColor (playerid, BRANCO);
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid);
TogglePlayerControllable (playerid, true);
HasBeenArrested {} playerid = false;
nova string [150];
formato (string, sizeof (string), "Welcome to NVPD cela (6), vocк foi preso por% d segundos.", tempo);
SendClientMessage (playerid, vermelho, string);
SendClientMessage (playerid, BRANCO, "Try / (esc) macaco ou arranjar alguйm para / break / ou salvб-lo.");
KillTimer (JailTimer [playerid]);
JailTimer [playerid] = SetTimerEx ("AutoUnjail", 1000, verdadeiro, "% d", playerid);
}
return 1;
}
//
if (GoToJail {playerid} == verdadeiro && GetTeam {playerid} == CLASS_CIV)
{
SendPlayerToJail (playerid);
return 1;
}
if (HasDied {playerid} == true)
{
nova rand = aleatуrios (sizeof (MedicSpawns));
//SetPlayerPos (playerid, MedicSpawns [rand] [0], MedicSpawns [rand] [1], MedicSpawns [rand] [2]);
//SetPlayerFacingAngle (playerid, MedicSpawns [rand] [3]);
HasDied {} playerid = false;
if (GetTeam {playerid} == CLASS_COPS)
{
SetPlayerWantedLevel (playerid, 0);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
}
else if (playerid GetTeam {} == CLASS_CIA)
{
SetPlayerWantedLevel (playerid, 0);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
}
else if (playerid GetTeam {} == CLASS_SWAT)
{
SetPlayerWantedLevel (playerid, 0);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
}
else if (playerid GetTeam {} == CLASS_ARMY)
{
SetPlayerWantedLevel (playerid, 0);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
}
else if (playerid GetTeam {} == CLASS_MEDIC)
{
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid);
}
else if (playerid GetTeam {} == CLASS_CIV)
{
SetPlayerWantedLevel (playerid, 0);
se (IsPlayerAttachedObjectSlotUsed (playerid, 2)) RemovePlayerAttachedObject (playerid, 2);
}
}
if (GetTeam {playerid} == CLASS_COPS)
{
ShowPlayerDialog (playerid, COP_MSG, DIALOG_STYLE_MSGBOX, "{} FFFFFF New Police Vegas",
"{} Sua FFFFFF um policial, seu trabalho й prender (/ ar) e takedown \ criminosos Nwanted (/ pc) e bilhete (/ tk) civis suspeitos (/ pc). \ N Vocк pode tambйm / taze (/ tz) e / manguito (/ cf) criminosos procurados e vocк \ Ncan / resgatar prisioneiros ou tomar um / suborno de criminosos procurados. \ nUse / c [msg] para [Cop Radio] \ n \ nUse / Perguntas Frequentes para a lista de perguntas mais frequentes perguntas e / cmds \ npara uma lista de comandos disponнveis Use / askadmin para administrador help \ nem uso / n para assistкncia ajudante "," Ok "," ")..;
}
else if (playerid GetTeam {} == CLASS_CIA)
{
ShowPlayerDialog (playerid, CIA_MSG, DIALOG_STYLE_MSGBOX, "{} FFFFFF New Vegas CIA",
"{} Sua FFFFFF um agente secreto da CIA, seu trabalho й focar e takedown \ Nmost criminosos procurados (/ pc) nгo detectados usando suas tбticas stealth. \ N Vocк tambйm pode / taze (/ tz) e / manguito (/ cf) queria criminosos e vocк \ Ncan / resgatar prisioneiros ou tomar um / suborno de criminosos procurados. \ nUse / c [msg] para [Cop Radio] \ n \ nUse / Perguntas Frequentes para a lista de perguntas mais frequentes e / cmds \ npara uma lista dos comandos disponнveis Use / askadmin para administrador help \ nem uso / n para assistкncia ajudante "," Ok "," ")..;
}
else if (playerid GetTeam {} == CLASS_SWAT)
{
ShowPlayerDialog (playerid, SWAT_MSG, DIALOG_STYLE_MSGBOX, "{} FFFFFF SWAT",
"{} Sua FFFFFF um SWAT Oficial, seu trabalho й focar e takedown \ Nmost criminosos procurados (/ pc) nгo detectados usando suas tбticas stealth. \ N Vocк tambйm pode / taze (/ tz) e / manguito (/ cf) criminosos procurados e vocк \ Ncan / resgatar prisioneiros ou tomar um / suborno de criminosos procurados. \ nUse / c [msg] para [Cop Radio] \ n \ nUse / Perguntas Frequentes para a lista de perguntas mais frequentes e / cmds \ npara uma lista de comandos disponнveis Use / askadmin para administrador help \ nem uso / n para assistкncia ajudante "," Ok "," ")..;
}
else if (playerid GetTeam {} == CLASS_CIV)
{
ShowPlayerDialog (playerid, CIV_MSG, DIALOG_STYLE_MSGBOX, "{} FFFFFF Civil",
"{} Sua FFFFFF um civil (ladrгo), seu trabalho й para roubar jogadores, casinos, \ nbanks, lojas e empresas ao tentar evitar a prisгo de execuзгo \ nlaw. Se vocк ficar preso ou levado para baixo, entгo vocк estб \ nsent para a cadeia por 3-4 minutos, que vocк pode ou / escapar ou obter um \ Nfriend a / break / ou salvб-lo. \ n \ nUse / Perguntas Frequentes para a lista de perguntas mais frequentes e / cmds \ Nfor uma lista de comandos disponнveis. Use / askadmin para administrador help \ nem uso / n para assistкncia ajudante "," Ok ",". ");
}
else if (playerid GetTeam {} == CLASS_MEDIC)
{
ShowPlayerDialog (playerid, MEDIC_MSG, DIALOG_STYLE_MSGBOX, "{} FFFFFF Medic",
"{} Sua FFFFFF um mйdico, seu trabalho й ajudar os membros do New Vegas com \ ninjuries usando / mйdico, eles podem tambйm / callmedic para pedir ajuda. \ NUse / m [msg] para [Medic Radio] \ n \ nUse / Perguntas Frequentes para a lista de perguntas mais frequentes e / cmds \ npara uma lista de comandos disponнveis Use / askadmin para administrador help \ nem uso / n para assistкncia ajudante "," Ok "," ")..;
}
else if (playerid GetTeam {} == CLASS_ARMY)
{
ShowPlayerDialog (playerid, ARMY_MSG, DIALOG_STYLE_MSGBOX, "{} FFFFFF Novo Exйrcito Vegas",
"{} Sua FFFFFF um soldado do exйrcito, seu trabalho й focar e takedown criminosos Nwanted mais \ (/ PC) em todos os custos, utilizando exйrcito fornecido veнculos. \ N Vocк tambйm pode / taze (/ tz) e / manguito (/ cf) criminosos procurados e vocк \ Ncan / resgatar prisioneiros ou tomar um / suborno de criminosos procurados. \ nUse / c [msg] para [Cop Radio] \ n \ nUse / Perguntas Frequentes para a lista de perguntas mais frequentes e / cmds \ npara um lista de comandos disponнveis Use / askadmin para administrador help \ nem uso / n para assistкncia ajudante "," Ok "," ")..;
}
if (playerid HasDied {} == falsos && GetTeam {playerid} == CLASS_COPS)
{
SetPlayerWantedLevel (playerid, 0);
SetPlayerColor (playerid, Azul);
nova rand = aleatуrios (sizeof (CopSpawns));
//SetPlayerPos (playerid, CopSpawns [rand] [0], CopSpawns [rand] [1], CopSpawns [rand] [2]);
//SetPlayerFacingAngle (playerid, CopSpawns [rand] [3]);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
SetPlayerAttachedObject (playerid, 1, 18637, 4, 0,3, 0, 0, 0, 170, 270, 1, 1, 1);
}
else if (HasDied {playerid} == false && GetTeam {playerid} == CLASS_CIA)
{
SetPlayerWantedLevel (playerid, 0);
SetPlayerColor (playerid, BRANCO);
nova rand = aleatуrios (sizeof (CIASpawns));
//SetPlayerPos (playerid, CIASpawns [rand] [0], CIASpawns [rand] [1], CIASpawns [rand] [2]);
//SetPlayerFacingAngle (playerid, CIASpawns [rand] [3]);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
SetPlayerAttachedObject (playerid, 1, 18637, 4, 0,3, 0, 0, 0, 170, 270, 1, 1, 1);
}
else if (HasDied {playerid} == false && GetTeam {playerid} == CLASS_SWAT)
{
SetPlayerWantedLevel (playerid, 0);
SetPlayerColor (playerid, BRANCO);
nova rand = aleatуrios (sizeof (SWATSpawns));
//SetPlayerPos (playerid, SWATSpawns [rand] [0] + 2.0, SWATSpawns [rand] [1], SWATSpawns [rand] [2]);
//SetPlayerFacingAngle (playerid, SWATSpawns [rand] [3]);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
SetPlayerAttachedObject (playerid, 1, 18637, 4, 0,3, 0, 0, 0, 170, 270, 1, 1, 1);
}
else if (HasDied {playerid} == false && GetTeam {playerid} == CLASS_CIV)
{
SetPlayerColor (playerid, BRANCO);
nova rand = aleatуrios (sizeof (CivSpawns));
//SetPlayerPos (playerid, CivSpawns [rand] [0], CivSpawns [rand] [1], CivSpawns [rand] [2]);
//SetPlayerFacingAngle (playerid, CivSpawns [rand] [3]);
}
else if (HasDied {playerid} == false && GetTeam {playerid} == CLASS_MEDIC)
{
SetPlayerWantedLevel (playerid, 0);
ResetPlayerWeapons (playerid);
SetPlayerArmour (playerid, 100);
SetPlayerColor (playerid, PINK);
nova rand = aleatуrios (sizeof (MedicSpawns));
//SetPlayerPos (playerid, MedicSpawns [rand] [0], MedicSpawns [rand] [1], MedicSpawns [rand] [2]);
//SetPlayerFacingAngle (playerid, MedicSpawns [rand] [3]);
}
else if (HasDied {playerid} == false && GetTeam {playerid} == CLASS_ARMY)
{
SetPlayerWantedLevel (playerid, 0);
SetPlayerColor (playerid, VERDE);
nova rand = aleatуrios (sizeof (ArmySpawns));
//SetPlayerPos (playerid, ArmySpawns [rand] [0], ArmySpawns [rand] [1], ArmySpawns [rand] [2]);
//SetPlayerFacingAngle (playerid, ArmySpawns [rand] [3]);
se (IsPlayerAttachedObjectSlotUsed (playerid, 1)) RemovePlayerAttachedObject (playerid, 1);
SetPlayerAttachedObject (playerid, 1, 18637, 1, 0, -0,1, 0,18, 90, 0, 272, 1, 1, 1);
}
if (IsUnfairDeath {playerid} == true)
{
IsUnfairDeath {} playerid = false;
GameTextForPlayer (playerid, "~ g ~ desleal ~ r ~ Morte.", 3000,5);
SendClientMessage (playerid, AMARELO, "morte injusta Continuando vida atual ....");
}
if (IsPlayerConnected (playerid) && IsLoggedIn {playerid} == 1)
{
SaveBankStats (playerid);
SaveFightStats (playerid);
SaveUserStats (playerid);
SaveDegreeStats (playerid);
}
IsPlayersFirstSpawn {} playerid = true;
SetPlayerPos (playerid, 2517.2141, 2304.2932, 10.8203);
SetPlayerFacingAngle (playerid, 354.8948);
return 1;
}