How to avoid CMD SPAM?
#1

PHP код:

CMD
:suicide(playerid)
{
    if(
pInfo[playerid][pIsPlayerLogged] == false) return SendClientMessage(playerid,-1,"*"COL_RED" You haven't logged-in yet!");
    if(
pInfo[playerid][pIsPlayerSpawned] == false) return SendClientMessage(playerid,-1,"*"COL_RED" You are not spawned yet!");
    if(
pInfo[playerid][pHours] < 5) return SendClientMessage(playerid, -1"*"COL_RED" You need at least 5 hour IG time to use this command!"); 
    
SetPlayerHealth(playerid0.0);
    
SendClientMessage(playerid, -1"*"COL_RED" You have commited suicide!");
    return 
CMD_SUCCESS;

You can only use the command every 30 minutes, I want tha. I just don't know how. If it's not yet 30 minutes then it'll send a message "You can only commit suicide once every 30 minutes".


Thanks.
Reply


Messages In This Thread
How to avoid CMD SPAM? - by DarkMythHunter - 16.09.2018, 04:24
Re: How to avoid CMD SPAM? - by UFF - 16.09.2018, 04:30
Re: How to avoid CMD SPAM? - by iLearner - 16.09.2018, 05:06
Re: How to avoid CMD SPAM? - by Undef1ned - 16.09.2018, 06:06
Re: How to avoid CMD SPAM? - by UFF - 16.09.2018, 06:08
Re: How to avoid CMD SPAM? - by KinderClans - 16.09.2018, 08:23
Re: How to avoid CMD SPAM? - by spinu - 16.09.2018, 09:29

Forum Jump:


Users browsing this thread: 1 Guest(s)