13.01.2010, 14:12
Yeah I fixed it myself, here's my code:
Could you make it so that if you do /getdeathreward, it says "Are you sure you want to exchange your deathstreak for a reward?", and you have to type confirm to get the reward?
Код:
if (strcmp("/getdeathreward", cmdtext, true) == 0) { if(deaths[playerid] == 2) { GivePlayerWeapon(playerid, 1, 1); SendClientMessage(playerid, COLOR_WHITE, "You have been given some brass knuckles as a death reward."); deaths[playerid] = 0; } else if(deaths[playerid] == 3) { GivePlayerWeapon(playerid, 2, 1); SendClientMessage(playerid, COLOR_WHITE, "You have been given a golf club as a death reward."); deaths[playerid] = 0; } else if(deaths[playerid] == 4) { GivePlayerWeapon(playerid, 3, 1); SendClientMessage(playerid, COLOR_WHITE, "You have been given a night stick as a death reward."); deaths[playerid] = 0; } return 1; } if (strcmp("/deathstreak", cmdtext, true) == 0) { new string[128]; format(string, sizeof(string), "You have a deathstreak of %d deaths.", deaths[playerid]); SendClientMessage(playerid, COLOR_WHITE, string); return 1; }