22.11.2013, 21:17
Hello i want a timer of if it is able to disable the command after using it
here is the code:
here is the code:
Code:
if(!strcmp(cmdtext, "/g7190", true)) { new string4[658], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); strcat(string4, "Key activated: g7190\n"); strcat(string4, "\n"); strcat(string4, "In this key you will have:\n"); strcat(string4, "\n"); strcat(string4, "10000$\n"); strcat(string4, "2 Gold-Bars"); ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_MSGBOX, "Gift:", string4, "Okay", ""); PlayerInfo[playerid][pCash] += 10000; PlayerInfo[playerid][pGoldBars] += 2; printf("Key activated: g7190"); printf("Player: %s", pName); SetTimerEx("gKey", 3600, false, "i", playerid); return 1; }