Adding [Reason]
#1

pawn Код:
if (strcmp(cmd, "/suspect", true) == 0)
    {
      if(gTeam[playerid] != TEAM_COPS)
        {
          tmp = strtok(cmdtext, index);
          if(strlen(tmp))
            {
              id = strval(tmp);
              if(IsPlayerConnected(id))
                {
                            new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], string[128];
                            GetPlayerName(playerid, name, sizeof(name));
                            GetPlayerName(playerid, name2, sizeof(name2));
                            format(string, sizeof(string), "-> Police Officer %s has suspected a %s", name, name2 );
                            SendClientMessageToAll(0xFFFF00AA, string);
                            SendClientMessage(id, 0xFFFF00AA, "-> You are now a police suspect, cops will try to arrest you!");
                            SetPlayerWantedLevel(id, 2);
                            return 1;
                            }
                           
                            else return SendClientMessage(id, 0xFFFF00AA, "-> Player not found");
                            }
                           
                            else return SendClientMessage(id, 0xFFFF00AA, "-> You mean: /suspect [PlayerID]");
                            }
                           
                            else return SendClientMessage(id, 0xFFFF00AA, "-> You are not a Police Officer");
                            }

How could I add [Reason] for the command? Like /suspect [PlayerID] [Reason]
Reply


Messages In This Thread
Adding [Reason] - by Hot - 21.05.2009, 22:08
Re: Adding [Reason] - by Jefff - 21.05.2009, 22:29
Re: Adding [Reason] - by Hot - 21.05.2009, 22:35
Re: Adding [Reason] - by NovaParadox - 21.05.2009, 22:43
Re: Adding [Reason] - by Badger(new) - 21.05.2009, 22:49
Re: Adding [Reason] - by NovaParadox - 21.05.2009, 23:06
Re: Adding [Reason] - by Badger(new) - 21.05.2009, 23:33

Forum Jump:


Users browsing this thread: 1 Guest(s)