Код:
public OnPlayerSpawn(playerid)
{
SetPlayerHealthEx(playerid, 100);
SetPlayerArmourEx(playerid, 0);
TextDrawShowForPlayer(playerid, Time);
TextDrawShowForPlayer(playerid, Date);
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
DestroyDynamic3DTextLabel(WantedScris[playerid]);
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
Tigaanel[playerid] = 1;
DestroyDynamic3DTextLabel(WantedScris[playerid]);
new str2[256];
format(str2,sizeof(str2),"{FF00FF}Nivel de urmarire: %d", PlayerInfo[playerid][pWantedLevel]);
WantedScris[playerid] = CreateDynamic3DTextLabel(str2, COLOR_WHITE, 0, 0, -20, 20, playerid);
Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, WantedScris[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.48);
}
DestroyDynamic3DTextLabel(DeadScris[playerid]);
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
new str1[256];
PlayerTextDrawShow(playerid, WantedText[playerid]);
format(str1,sizeof(str1),"Urmarirea scade in: ~r~%d minute",wantedlost[playerid]/60+1);
PlayerTextDrawSetString(playerid, WantedText[playerid], str1);
}
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
if(OnDuty[playerid] > 0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
GivePlayerWeaponEx(playerid, 24, 500);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 41, 500);
GivePlayerWeaponEx(playerid, 29, 1000);
GivePlayerWeaponEx(playerid, 31, 1000);
SetPlayerArmourEx(playerid, 100);
SetPlayerHealthEx(playerid, 100);
}
if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
GivePlayerWeaponEx(playerid, 24, 500);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 41, 500);
GivePlayerWeaponEx(playerid, 29, 1000);
GivePlayerWeaponEx(playerid, 31, 1000);
SetPlayerArmourEx(playerid, 100);
SetPlayerHealthEx(playerid, 100);
}
if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
GivePlayerWeaponEx(playerid, 24, 500);
GivePlayerWeaponEx(playerid, 41, 500);
GivePlayerWeaponEx(playerid, 29, 1000);
GivePlayerWeaponEx(playerid, 31, 1000);
SetPlayerArmourEx(playerid, 100);
SetPlayerHealthEx(playerid, 100);
}
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
{
GivePlayerWeaponEx(playerid, 24, 500);
GivePlayerWeaponEx(playerid, 3, 1);
GivePlayerWeaponEx(playerid, 41, 500);
GivePlayerWeaponEx(playerid, 29, 1000);
GivePlayerWeaponEx(playerid, 31, 1000);
SetPlayerArmourEx(playerid, 100);
SetPlayerHealthEx(playerid, 100);
}
}
if(!gPlayerAnimLibsPreloaded[playerid])
{
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"MISC");
PreloadAnimLib(playerid,"SWEET");
PreloadAnimLib(playerid,"RIOT");
PreloadAnimLib(playerid,"PED");
PreloadAnimLib(playerid,"POLICE");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
gPlayerAnimLibsPreloaded[playerid] = 1;
}
gTeam[playerid] = PlayerInfo[playerid][pTeam];
if(gTeam[playerid] == 4)
{
gTeam[playerid] = 4;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
{
gTeam[playerid] = 2;
PlayerInfo[playerid][pTeam] = 2;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "** Trebuie sa te loghezi inainte de a te spawna (KICK) **");
Kick(playerid);
return 1;
}
ChosenSkin[playerid] = 1;
SetPlayerSpawn(playerid);
SetPlayerToTeamColor(playerid);
playerdeath[playerid] = 0;
Undercover[playerid] = 0;
SetPlayerTeam(playerid,4);
StopAudioStreamForPlayer(playerid);
return 1;
}