15.02.2014, 12:36
Код:
public OnPlayerSpawn(playerid) { if (CheckDeathOnGodMode[playerid] == 1) { SetPlayerPos(playerid, xGodmode, yGodmode, zGodmode); CheckDeathOnGodMode[playerid] = 0; } /*if (IsLoggedIn[playerid] == 0) { ForceClassSelection(playerid); TogglePlayerSpectating(playerid, true); TogglePlayerSpectating(playerid, false); }*/ else { SetPlayerInterior(playerid,0); for(new i=0; i < sizeof(ZoneInfo); i++) { GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); } SetPlayerToTeamColor(playerid); if (PlayerInfo[playerid][pCash] < 1000) { PlayerInfo[playerid][pCash] = 1000; ResetPlayerMoney(playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); } else { ResetPlayerMoney(playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); } } return 1; }
Код:
public OnPlayerDeath(playerid, killerid, reason) { if (GodMode[playerid] == 1) { GetPlayerPos(playerid, xGodmode, yGodmode, zGodmode); //SetTimerEx("GodmodeDelay", 2750, false, "i", playerid); CheckDeathOnGodMode[playerid] = 1; } else { PlayerInfo[killerid][pKills]++; PlayerInfo[killerid][pCash] = (PlayerInfo[killerid][pCash] + 1000); GivePlayerMoney(killerid, 1000); PlayerInfo[playerid][pDeaths]++; if (PlayerInfo[playerid][pCash] < 2000) { PlayerInfo[playerid][pCash] = 1000; } else { PlayerInfo[playerid][pCash] = (PlayerInfo[playerid][pCash] - 1000); } } return 1; }
If the player dies with 5000, he spawns with 5000, whilst it's supposed to go down to 4000... Not sure what I did wrong?