Array must be indexed /cuff cmd
#1

pawn Код:
if(!strcmp(cmd,"/cuff",true))
    {
    giveplayername=ReturnUser(tmp); // this line
    cmd=strtok(cmdtext,idx);
    if(gTeam[playerid] == TEAM_POLICE)
    {
    if(!strlen(cmd)) return SendClientMessage(playerid,GREY,"USAGE: /cuff [playerid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,RED,"ERROR: Invalid player id!");
    TogglePlayerControllable(id,0);
    GameTextForPlayer(id, "~y~ Cuffed!",2500,3);
  new str[128];
  GetPlayerName(playerid, str, sizeof(str));
  GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
  format(str, sizeof(str), " * %s takes out his cuffs and places it on %s hands. ", str, giveplayername);
  ProxDetector(50.0, playerid, str,0x6699FFAA,0x6699FFAA,0x6699FFAA,0x6699FFAA,0x6699FFAA);
  return 1;
    }
    else
    {
    SendClientMessage(playerid, RED, "ERROR: You're not a police officer!");
    }
    return true;
    }
And I have the "new Giveplayername[MAX_PLAYER_NAME];" at top of the OnPlayerCommandText..

Thank you.

And yes, I have searched.
Reply


Messages In This Thread
Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:09
Re: Array must be indexed /cuff cmd - by M4S7ERMIND - 20.07.2009, 10:12
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:13
Re: Array must be indexed /cuff cmd - by MadeMan - 20.07.2009, 10:30
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:33
Re: Array must be indexed /cuff cmd - by refshal - 20.07.2009, 10:39
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 10:44
Re: Array must be indexed /cuff cmd - by MadeMan - 20.07.2009, 11:04
Re: Array must be indexed /cuff cmd - by Donny_k - 20.07.2009, 11:11
Re: Array must be indexed /cuff cmd - by Klutty - 20.07.2009, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)