27.02.2009, 00:33
In OnPlayerDeath, how can i check if the reason for death is by /kill? is there like an id for that?
also, i have a /rob command for the casino. how would i make random money to be given, and display it:
format(string, sizeof(string), "%s has robbed caligulas casino and got a total of [amnt. of money]",pName);
also, i have a /rob command for the casino. how would i make random money to be given, and display it:
format(string, sizeof(string), "%s has robbed caligulas casino and got a total of [amnt. of money]",pName);
Код:
if(strcmp(cmdtext, "/rob", true) == 0) { if(GetPlayerInterior(playerid) == 1) { SendClientMessage(playerid, COLOR_GREEN, "== You robbed the casino and got $10,000"); SendClientMessage(playerid, COLOR_YELLOW, "== Get to the safe zone to clear wanted level."); new pName[MAX_PLAYER_NAME]; new string [265]; GetPlayerName(playerid,pName,sizeof(pName)); format(string, sizeof(string), "%s has robbed caligulas casino and got a total of $10,000",pName); SendClientMessageToAll(COLOR_RED,string); GivePlayerMoney(playerid,10000); SetPlayerWantedLevel(playerid,6); } else { SendClientMessage(playerid, COLOR_RED, "== You must be in Caligulas Casino to rob."); }