SLOVED
#2

pawn Код:
#include <a_samp>
#define TEAM_HUMAN_COLOR 0x33AA33AA

public OnPlayerCommandText(playerid, cmdtext[])
{
 new cmd[256];

 if(strcmp(cmd, "/r", true) == 0)
 {


  if(IsPlayerConnected(playerid))
  {
    new string[128], sendername[MAX_PLAYER_NAME], idx;
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
      idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
      result[idx - offset] = cmdtext[idx];
      idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
      SendClientMessage(playerid,0x33AA33AA, "USAGE: /r [radio chat]");
      return 1;
    }
    format(string, sizeof(string), "CB Radio: %s says: %s", sendername, result);
    SendClientMessageToAll(0x33AA33AA,string);
    printf("%s", string);
    return 1;
    }
 }
 return 0;
 }
Reply


Messages In This Thread
SLOVED - by krisko_g1 - 12.10.2009, 20:16
Re: 2 errors in cmd script - by Peter_Corneile - 12.10.2009, 21:02
Re: SLOVED - by krisko_g1 - 12.10.2009, 21:04
Re: SLOVED - by Peter_Corneile - 12.10.2009, 21:04
Re: SLOVED - by Eazy_Efolife - 12.10.2009, 21:06
Re: SLOVED - by Peter_Corneile - 12.10.2009, 21:08
Re: SLOVED - by Jose 510 - 12.10.2009, 21:09
Re: SLOVED - by Hiitch - 12.10.2009, 22:18
Re: SLOVED - by Peter_Corneile - 12.10.2009, 22:27
Re: SLOVED - by Abernethy - 12.10.2009, 22:42

Forum Jump:


Users browsing this thread: 1 Guest(s)