report
#1

hello i have this cmd for report player everything is fine i just want if the player didnt type the reason it just send like blala has reported blabla with out the reason but i cant

PHP код:
CMD:report(playerid,params[])
{
  new 
TargetIDpName[24], tName[24], reason[100], str[150];
  if(
sscanf(params"us[100]",TargetID,reason)) return SendClientMessage(playerid,Red,"Report player: /report <id> <reason>");
  if(!
IsPlayerConnected(TargetID)) return SendClientMessage(playerid,Red,"Player is not connected");
  for(new 
i=0i<MAX_PLAYERSi++)
  {
       if(
IsPlayerAdmin(i))
      {
       
GetPlayerName(playerid,pName,sizeof(pName));
          
GetPlayerName(TargetID,tName,sizeof(tName));
       
format(str,sizeof(str),"%s has reported %s for: %s",pName,tName,reason);
       
SendClientMessage(i,Red,str);
    }
    
  }
  
SendClientMessage(playerid,Red,"Report has been sent");
  return 
1;

Reply


Messages In This Thread
report - by BoU3A - 02.11.2014, 04:21
Re: report - by Quickie - 02.11.2014, 04:49
Re: report - by BoU3A - 02.11.2014, 04:57
Re: report - by M4D - 02.11.2014, 05:15
Re: report - by DavidBilla - 02.11.2014, 05:59

Forum Jump:


Users browsing this thread: 1 Guest(s)