25.01.2014, 19:33
I am trying to make the 24/7 rob able.
The command works but the timer does not.
Here is the code:
The command works but the timer does not.
Here is the code:
Код:
CMD:rob(playerid, params[]) { if(Shop(playerid) == NOT_IN_ROB) return SendClientMessage(playerid, -1, "You cant rob this place."); if(Rob(playerid) == ROB_SHOP_247) { if(PlayerInfo[playerid][pVW] == 53434244) { new str[128]; SetTimerEx("Rob247", 3000, false, "i", playerid); SendClientMessageToLSPD(COLOR_TWBLUE, "The 24/7 next to City Hall is being robbed."); SendClientMessage(playerid, -1, "You are robbing the 24/7."); format(str, sizeof(str), "** %s is attempting to rob the 24/7.", GetName(playerid)); ProxDetector(50.0, playerid, str, COLOR_PURPLE); } } return 1; }
Код:
forward Rob247(playerid); public Rob247(playerid) { if(PlayerInfo[playerid][pVW] == 5343424) { new str[128]; new cash = random(1900) + 600; PlayerInfo[playerid][pCash] += cash; ClearAnimations(playerid); format(str, sizeof(str), "You have just robbed a 24/7 earning you $%i", cash); SendClientMessage(playerid, -1, str); print("24/7 being robbed."); return 1; } return 1; }