Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerSpawn(playerid)
- {
- if(IsDead[playerid])
- {
- pInfo[playerid][pHealth] = 95;
- pInfo[playerid][pArmor] = 0;
- IsDead[playerid] = false;
- }
- if(CurrentWeapon[playerid] != -1)
- {
- GivePlayerWeapon(playerid, CurrentWeapon[playerid], CurrentAmmo[playerid]);
- }
- SetPlayerHealth(playerid, pInfo[playerid][pHealth]);
- SetPlayerArmour(playerid, pInfo[playerid][pArmor]);
- SetPlayerColor(playerid, COLOR_WHITE);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 8)) RemovePlayerAttachedObject(playerid, 8);
- CallLocalFunction("PlayerEquip", "i", playerid);
- IsPlayerLoggedIn[playerid] = true;
- new count;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && IsPlayerLoggedIn[i]) count++;
- }
- if(MaxPlayers < count)
- {
- SCMA(COLOR_GREEN, "The server has reached a new max player count!");
- MaxPlayers = count;
- CallLocalFunction("SaveServer","i",0);
- }
- for(new i=0; i<11; i++)
- {
- SetPlayerSkillLevel(playerid, i, 1);
- }
- //DELETE
- for(new i=0; i<100; i++)
- {
- new Float:x, Float:y, Float:z;
- x = pInfo[playerid][pX] + i;
- y = pInfo[playerid][pY];
- z = pInfo[playerid][pZ];
- CallLocalFunction("CreateLoot", "iifff", random(54)+1, random(51), x, y, z);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment