Need help [/report command]
#5

thnx for the help guys But i am trying to use this cmd and every time i try to compile it my pawno crashes

Код:
if(strcmp(cmd, "/report", true) == 0) 
    { 
        if(IsPlayerConnected(playerid)) 
        { 
            GetPlayerName(playerid, sendername, sizeof(sendername)); 
            new length = strlen(cmdtext); 
            while ((idx < length) && (cmdtext[idx] <= ' ')) 
            { 
                idx++; 
            } 
            new offset = idx; 
            new result[96]; 
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) 
            { 
                result[idx - offset] = cmdtext[idx]; 
                idx++; 
            } 
            result[idx - offset] = EOS; 
            if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [text]"); 
            format(string, sizeof(string), "Report from [%d]%s: %s",playerid, sendername, (result)); 
            ABroadCast(COLOR_LIGHTYELLOW,string,1); 
            SendClientMessage(playerid, COLOR_YELLOW, "Your report message was sent to online administrators, thank you."); 
        } 
        return 1; 
    }
Reply


Messages In This Thread
Need help [/report command] - by OmerKhan - 03.08.2016, 14:21
Re: Need help [/report command] - by AndySedeyn - 03.08.2016, 14:31
Re: Need help [/report command] - by Jpew - 03.08.2016, 14:37
Re: Need help [/report command] - by Shinja - 03.08.2016, 14:40
Re: Need help [/report command] - by OmerKhan - 03.08.2016, 14:41
Re: Need help [/report command] - by AndySedeyn - 03.08.2016, 14:45
Re: Need help [/report command] - by OmerKhan - 03.08.2016, 14:51
Re: Need help [/report command] - by AndySedeyn - 03.08.2016, 14:52
Re: Need help [/report command] - by OmerKhan - 03.08.2016, 14:54
Re: Need help [/report command] - by SyS - 03.08.2016, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)