19.06.2010, 10:19
Look,i made AntiPG system for GodFather script,but main part of script doesn't work...I don't know where is the problem:
BTW.Part with SetPlayerSpawn doesn't work
Код:
new gInjured[MAX_PLAYERS]; new gKilled[MAX_PLAYERS]; enum pPort { Float:pPortx, Float:pPorty, Float:pPortz, }; new PlayerPort[MAX_PLAYERS][pPort]; //on SetPlayerSpawn if(gKilled[playerid] == 1) { SetPlayerPos(playerid, PlayerPort[playerid][pPortx], PlayerPort[playerid][pPorty], PlayerPort[playerid][pPortz]); SendClientMessage(playerid, COLOR_LIGHTRED, "** Vraćeni ste lokaciju na kojoj ste ubijeni radi RP-a **"); SendClientMessage(playerid, COLOR_WHITE, "** Imate dvije opcije,ћelite li umrijeti ili nastaviti RP-ati i zvati doktora? **"); SendClientMessage(playerid, COLOR_WHITE, "** Ako ћelite umrijeti koristite /die,ako ћelite nastaviti RP-ati /live **"); new playername[24]; new string[128]; GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "** %s pada na pod i počinje se tresti.", playername); ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN); gInjured[playerid] = 1; SetPlayerHealth(playerid,25.0); TogglePlayerControllable(playerid, 0); ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); } //OnPlayerDeath else if (reason == 31) { gKilled[playerid] = 1; new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); PlayerPort[playerid][pPortx] = x; PlayerPort[playerid][pPorty] = y; PlayerPort[playerid][pPortz] = z; }