04.04.2010, 21:43
ok so here`s the code for the /heal command
and here`s the error it gives
hope you can help me ASAP
Код:
dcmd_heal(playerid,params[]) { #pragma unused params new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if(IsPlayerInCheckpoint(playerid) == 1) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SendClientMessage(playerid,COLOUR_RED,"You must be on foot. Get out of the vehicle!"); } else { new PRICE = 1000; if(PRICE <= GetPlayerMoney(playerid)) { GivePlayerMoney(playerid, - PRICE); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); SendClientMessage(playerid,COLOUR_GREEN,"You have been succesfully healed. Have fun!"); } else { SendClientMessage(playerid,COLOUR_GREEN,"You need 1000$ to heal and armor yourself!"); } } else SendClientMessage(playerid,COLOUR_RED,"You must be at the Hospital!"); } return 1; }
Код:
C:\DOCUME~1\Master\Desktop\SANFIE~2\GAMEMO~1\SF-MW1~1.PWN(225) : error 029: invalid expression, assumed zero