[Help]Need /goto help
#8

i have another but ...

pawn Код:
if(strcmp(cmd, "/goto", true) == 0)     {
    if(PlayerInfo[playerid][Level] >= 2) {
        new player1, tmp[256];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    {
           SendClientMessage(playerid, red, "USAGE: /goto [playerid]");
        return 1;    }
        player1 = strval(tmp);

         if(IsPlayerConnected(player1))        {
            CMDMessageToAdmins(playerid,"GOTO");
            new Float:x, Float:y, Float:z;    GetPlayerPos(player1,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(player1));
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
            if(GetPlayerState(playerid) == 2)    {
                SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z);    LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
                SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
            } else    {
                SetPlayerPos(playerid,x+2,y,z);    }
            GetPlayerName(player1, playername, sizeof(playername));        GetPlayerName(playerid, adminname, sizeof(adminname));
            //format(string,256,"Administrator %s has teleported to you",adminname);    SendClientMessage(player1,blue,string);
            format(string,256,"You have teleported to %s", playername); SendClientMessage(playerid,blue,string);
               return 1;
        } else {
         SendClientMessage(playerid, red, "Player is not connected");
         return 1;    }
    } else     {
    SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");   }
     return 1;    }
Reply


Messages In This Thread
[Help]Need /goto help - by Alex_Valde - 01.10.2010, 18:28
Re: [Help]Need /goto help - by Ash. - 01.10.2010, 18:30
Re: [Help]Need /goto help - by Alex_Valde - 01.10.2010, 18:40
Re: [Help]Need /goto help - by bigcomfycouch - 01.10.2010, 18:45
Re: [Help]Need /goto help - by Grim_ - 01.10.2010, 18:48
Re: [Help]Need /goto help - by bigcomfycouch - 01.10.2010, 18:51
Re: [Help]Need /goto help - by Alex_Valde - 01.10.2010, 18:54
Re: [Help]Need /goto help - by [Lsrcr]Rafa - 01.10.2010, 19:17

Forum Jump:


Users browsing this thread: 1 Guest(s)