some admin command
#8

pawn Код:
if(strcmp(cmd, "/goto", true) == 0)
    {
        tmp = strtok(cmdtext,idx);
        if (!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
        return 1;
      }
        new int_id;
        int_id = strval(tmp);

        tmp = strtok(cmdtext,idx);
        if (!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
        return 1;
      }
        new Float:int_x;
        int_x = floatstr(tmp);

        tmp = strtok(cmdtext,idx);
        if (!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
        return 1;
      }
        new Float:int_y;
        int_y = floatstr(tmp);

        tmp = strtok(cmdtext,idx);
        if (!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_GREY, "SYNTAX - /goto [interior] [x] [y] [z]");
        return 1;
      }
        new Float:int_z;
        int_z = floatstr(tmp);

        SetPlayerPos(playerid, int_x, int_y, int_z);
        SetPlayerInterior(playerid, int_id);
        return 1;
    }
That should work.
Reply


Messages In This Thread
some admin command - by sandisk125 - 19.08.2009, 03:20
Re: some admin command - by coole210 - 19.08.2009, 03:32
Re: some admin command - by sandisk125 - 19.08.2009, 03:40
Re: some admin command - by coole210 - 19.08.2009, 03:45
Re: some admin command - by sandisk125 - 19.08.2009, 03:47
Re: some admin command - by coole210 - 19.08.2009, 03:54
Re: some admin command - by sandisk125 - 19.08.2009, 04:00
Re: some admin command - by Calgon - 19.08.2009, 04:10

Forum Jump:


Users browsing this thread: 1 Guest(s)