27.04.2012, 11:56
ok i've put the machines at each hospital and put in front of them the checkpoint.. now i want to do like this but i don't know very well the if statement.. i have this code
i want to do this thing (i wrtite it like i would like to do)
I know this is an wrong code but this is what i would like to have... anyone can help me?
Quote:
public OnPlayerEnterCheckpoint(playerid) { GivePlayerMoney(playerid, -1000); SetPlayerHealth(playerid, 100); return 1; } |
Quote:
public OnPlayerEnterCheckpoint(playerid) { if(PlayerMoney < 1000) SendClientMessage(playerid, 0x800080AA, "You don't have much money!!"); else GivePlayerMoney(playerid, -1000); SetPlayerHealth(playerid, 100); return 1; if(PlayerHealth = 100) SendClientMessage(playerid, 0x800080AA, "Your life is full!!"); else GivePlayerMoney(playerid, -1000); SetPlayerHealth(playerid, 100); return 1; } |