little help please, thanks.
#1

PHP код:
YCMD:report(playeridparams[], help) {
    if(
help) {
        
SendClientMessage(playeridX11_WHITE"Used for reporting a player");
        return 
1;
    }
    if(
GetPVarInt(playerid"ReportBanned") == 1) {
        
SendClientMessage(playeridX11_TOMATO_2"You are report banned!");
        return 
1;
    }
    new 
input[128],msg[128];
    if(!
sscanf(params"s[128]"input)) {
        new 
time GetPVarInt(playerid"RequestChatCooldown");
        new 
timenow gettime();
        if(
REQUESTCHAT_COOLDOWN-(timenow-time) > 0) {
            
SendClientMessage(playeridX11_TOMATO_2"You must wait before sending another report!");
            return 
1;
        }
        
SetPVarInt(playerid"RequestChatCooldown"gettime());
        
format(msgsizeof(msg), "Report from [%d]%s: {EE0000}%s"playeridGetPlayerNameEx(playeridENameType_CharName), input);
        
ABroadcast(X11_ORANGEmsgEAdminFlags_All);
        
AdminLog(playeridmsg);
        
SendClientMessage(playeridX11_WHITE"Your report has been sent to the admins, please be patient and wait until an admin can help you.");
        
//SendClientMessage(playerid, X11_YELLOW, input);
        
SetPVarInt(playerid"SentReport"1);
        
SetPVarString(playerid"ReportText"input);
    } else {
        
SendClientMessage(playeridX11_WHITE"USAGE: /report [message]");
    }
    return 
1;

How can I restrict this command to only work when the player enters /report [playerid] then [message], like the playerid is must.. thank you.
Reply


Messages In This Thread
little help please, thanks. - by Puff - 08.10.2017, 18:08
Re: little help please, thanks. - by FuNkYTheGreat - 08.10.2017, 18:35
Re: little help please, thanks. - by Puff - 09.10.2017, 06:27
Re: little help please, thanks. - by RIDE2DAY - 09.10.2017, 09:58
Re: little help please, thanks. - by Puff - 09.10.2017, 10:38

Forum Jump:


Users browsing this thread: 1 Guest(s)