Advertisement
garfield

[FS]: Simples sistema afk c/ motivo.

Nov 9th, 2012
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. #include a_samp
  2.  
  3.  
  4. public OnPlayerCommandText(playerid, cmdtext[]){
  5.  
  6.         if(!strcmp(cmdtext, "/afk", true, 4)){
  7.  
  8.             if(strlen(cmdtext) == 4)
  9.                 return SendClientMessage(playerid, -1, "/Afk <Motivo>");
  10.  
  11.             strdel(cmdtext, 0, 5);
  12.  
  13.             static
  14.                 String[128],
  15.                 Nome[24]
  16.             ;
  17.  
  18.             String[0] = '\0';
  19.  
  20.             format(String, 128, "Player %s ficou ausente, motivo: %s", (GetPlayerName(playerid, Nome, 24), Nome), cmdtext);
  21.             SendClientMessageToAll(-1, String);
  22.             return true;
  23.         }
  24.         return false;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement