Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerSpawn(playerid)
- {
- IsConnected[playerid] = 1;
- for(new i=0; i<10; i++)
- {
- ELC_AC_EnablePlayerCheatID(playerid,i,1);
- }
- previousHealthValue[playerid] = 0.0;
- hits[playerid] = 0;
- delayer[playerid] = false;
- afterSpawnCover[playerid] = true;
- SetTimerEx("RemoveSpawnCover", AFTER_SPAWN_COVER_TIME, false, "i", playerid);
- isDead[playerid] = false;
- // On met les couleurs
- if(GetPlayerTeam(playerid) == JUSTICE)
- {
- SetPlayerColor(playerid,TEAM_1_COLOR);
- new Random = random(sizeof(JusticeSpawn));
- SetPlayerPos(playerid, JusticeSpawn[Random][0], JusticeSpawn[Random][1], JusticeSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == GROVE)
- {
- SetPlayerColor(playerid,TEAM_2_COLOR);
- new Random = random(sizeof(GroveSpawn));
- SetPlayerPos(playerid, GroveSpawn[Random][0], GroveSpawn[Random][1], GroveSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == BALLAS)
- {
- SetPlayerColor(playerid,TEAM_3_COLOR);
- new Random = random(sizeof(BallasSpawn));
- SetPlayerPos(playerid, BallasSpawn[Random][0], BallasSpawn[Random][1], BallasSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == VAGOS)
- {
- SetPlayerColor(playerid,TEAM_4_COLOR);
- new Random = random(sizeof(VagosSpawn));
- SetPlayerPos(playerid, VagosSpawn[Random][0], VagosSpawn[Random][1], VagosSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == AZTECAS)
- {
- SetPlayerColor(playerid,TEAM_5_COLOR);
- new Random = random(sizeof(AztecasSpawn));
- SetPlayerPos(playerid, AztecasSpawn[Random][0], AztecasSpawn[Random][1], AztecasSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == RIFA)
- {
- SetPlayerColor(playerid,TEAM_6_COLOR);
- new Random = random(sizeof(RifaSpawn));
- SetPlayerPos(playerid, RifaSpawn[Random][0], RifaSpawn[Random][1], RifaSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == DNB)
- {
- SetPlayerColor(playerid,TEAM_7_COLOR);
- new Random = random(sizeof(DNBSpawn));
- SetPlayerPos(playerid, DNBSpawn[Random][0], DNBSpawn[Random][1], DNBSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == MafiaR)
- {
- SetPlayerColor(playerid,TEAM_8_COLOR);
- new Random = random(sizeof(MafiaRSpawn));
- SetPlayerPos(playerid, MafiaRSpawn[Random][0], MafiaRSpawn[Random][1], MafiaRSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == CLAN)
- {
- new Random = random(sizeof(CLANSpawn));
- SetPlayerPos(playerid, CLANSpawn[Random][0], CLANSpawn[Random][1], CLANSpawn[Random][2]);
- }
- if(GetPlayerTeam(playerid) == SAFE || InSafe[playerid] == 1) {SetPlayerColor(playerid,TEAM_2_COLOR);}
- // On affiche les statistiques sur sa tête
- Delete3DTextLabel(label);
- //new string[MAX_STRING_MSG];
- //format(string, sizeof(string), "Ping : {FFFFFF}%d{0C53ED} | FPS : {FFFFFF}%d{0C53ED}\nPacket lost : {FFFFFF}%0.1f", GetPlayerPing(playerid), pFPS[playerid], NetStats_PacketLossPercent(playerid));
- // label = Create3DTextLabel(string, 0x0C53EDFF, 30.0, 40.0, 50.0, 40.0, 0);
- //Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
- //StopAudioStreamForPlayer(playerid);
- // On cache les textdraws
- PlayerTextDrawHide(playerid, Class0[playerid]);
- PlayerTextDrawHide(playerid, Class1[playerid]);
- PlayerTextDrawHide(playerid, Class2[playerid]);
- PlayerTextDrawHide(playerid, Class3[playerid]);
- PlayerTextDrawHide(playerid, Class4[playerid]);
- PlayerTextDrawHide(playerid, Class5[playerid]);
- PlayerTextDrawHide(playerid, Class6[playerid]);
- PlayerTextDrawHide(playerid, Class7[playerid]);
- PlayerTextDrawHide(playerid, Class8[playerid]);
- PlayerTextDrawHide(playerid, Class10[playerid]);
- PlayerTextDrawHide(playerid, Class9[playerid]);
- PlayerTextDrawHide(playerid, Class11[playerid]);
- PlayerTextDrawHide(playerid, Class12[playerid]);
- PlayerTextDrawHide(playerid, Class13[playerid]);
- PlayerTextDrawHide(playerid, Class14[playerid]);
- textdraw(playerid);
- // Si il est en jail on le remet en jail.
- //if(PlayerInfo[playerid][pJailTime] >= 0) return JailPlayer(playerid);
- // Si il est en safe (ou qu'il a choisis safe) on le met en safe.
- if(InSafe[playerid] == 1 || GetPlayerTeam(playerid) ==SAFE) return Safe(playerid);
- // On donne la vie au joueur qui spawn.
- //SetPlayerHealth(playerid,100.0);
- if(InWar[playerid] == 1)
- {
- //RandomTPWAR(playerid);// Si il est en war, on le TP à une position aléatoire
- GiveWeapons(playerid);// Si il est en war, on lui donne les armes appropriés
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerVirtualWorld(playerid, 10);
- SetPlayerArmour(playerid, 100.0);
- SetTimerEx("antispawnkill", 1000, 0, "i", playerid);
- if(TeamClan[playerid] == 1)
- {
- SetPlayerSkin(playerid, ClanInfo[ PlayerInfo[playerid][pTeam] ][cSkin]);
- new string3[MAX_STRING_MSG];
- format(string3, sizeof(string3), "0x%sFF", ClanInfo[ PlayerInfo[playerid][pTeam] ][cColor]);
- new colorInt = HexToInt(string3);
- SetPlayerColor(playerid, colorInt);
- }
- // Modification textdraw
- new string2[MAX_STRING_MSG];
- format(string2, sizeof(string2), "~g~WARZONE");
- PlayerTextDrawSetString(playerid, Stats2[playerid], string2);
- }
- if(OnDM[playerid] == 1)
- {
- if(DM[playerid] == 1)
- {
- SetTimerEx("Tcgc", 500, false, "i", playerid);
- SetTimerEx("RendreArme2", 1000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(DM[playerid] == 2)
- {
- SetTimerEx("Trbf", 500, false, "i", playerid);
- SetTimerEx("WeaponArena", 1000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(DM[playerid] == 3)
- {
- SetTimerEx("Tcage", 500, false, "i", playerid);
- SetTimerEx("RendreArme", 1000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(DM[playerid] == 4)
- {
- SetTimerEx("Tosok", 500, false, "i", playerid);
- SetTimerEx("Osok", 1000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(DM[playerid] == 5)
- {
- SetTimerEx("TWarehouse", 500, false, "i", playerid);
- SetTimerEx("RendreArme2", 1000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(DM[playerid] == 6)
- {
- SetTimerEx("TBar", 500, false, "i", playerid);
- SetTimerEx("RendreArme3", 1000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement