24.01.2013, 15:25
Код:
if(strcmp(cmd, "/vida", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new location = PlayerInfo[playerid][pLocal]; if(!strlen(tmp)) { if(location != 255) { if(location < 99) { if(HouseInfo[location][hArm] == 1 && IsACop(playerid)) { SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); format(string, sizeof(string), "* %s pega seu colete e a vida.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); TogglePlayerControllable(playerid, 0); GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]); Unspec[playerid][sPint] = PlayerInfo[playerid][pInt]; Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal]; SetPlayerPos(playerid,1527.5,-12.1,1002.0); PlayerInfo[playerid][pLocal] = 255; SetPlayerInterior(playerid,99); Spectate[playerid] = 257; } else { SendClientMessage(playerid, COLOR_GREY,"Este lugar nao tem lugar de se curar."); } } } } } } return 1; }