24.06.2015, 18:04
(
Last edited by Inn0cent; 24/06/2015 at 07:32 PM.
)
You've forgot about setting the Robbed recently to 0, Lemme do it for you. You can also set up this thing in 1 timer instead of timer for every different robbery. But this way is more easy.
Code:
CMD:robthis(playerid, params[]) { #pragma unused params // we dont need the params if(IsPlayerInDynamicCP(playerid, CP_tatoo)) // Checking if player is in the checkpoint { if(tatoorobbedrecently >=1) //checking if tatoo shop has been robbed recently { SendClientMessage(playerid, COLOR_RED, "Tatoo Shop has been robbed recently"); // sending error message return 1; } SetTimer("robbedrecently", 180000, false);//Set a timer of 180 seconds to set the recentlyrobbed to 0 ROBBING_TATOO[playerid] = 60; // setting the robbery timer tatoorobbedrecently =180; // Time the players needs to wait for starting an another robbery in the same place } public robbedrecently() { tatoorobbedrecently = 0;//Sets it to zero } return 1; }