is this right?
#4

Код:
CMD:goto(playerid, params[])
{
    new id;
    new Float:X, Float:Y, Float:Z;
          new carid;
         new interior;
              interior = GetPlayerInterior(id);
        carid = GetPlayerVehiclelID(playerid);
    new Float:rX, Float:rY, Float:rZ;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid, -1, "USAGE: /goto [id]");
       if(id == playerid) return SendClientMessage(playerid,COLOR_RED,"You can't teleport to yourself!"):
         if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"This id is invalid");
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerPos(id, rX, rY, rZ);
                  SetPlayerPos(playerid,rX,rY,rZ);
                if( IsPlayerInAnyVehicle(id) )
                  {
                                  SetPlayerPos(playerid,rX,rY,rZ);
                                       SetPlayerInterior(playerid,interior);
                              PutPlayerInVehicle(playerid,carid,1);
                  }
    return 1;
}
i think this will be usefull
Reply


Messages In This Thread
is this right? - by thefatshizms - 06.06.2012, 12:13
Re: is this right? - by MadeMan - 06.06.2012, 12:14
Re: is this right? - by JaKe Elite - 06.06.2012, 12:15
Re: is this right? - by XStormiest - 06.06.2012, 12:21
Re: is this right? - by thefatshizms - 06.06.2012, 12:22
Re: is this right? - by blewert - 06.06.2012, 12:23
Re: is this right? - by JaKe Elite - 06.06.2012, 12:24
Re: is this right? - by thefatshizms - 06.06.2012, 12:25

Forum Jump:


Users browsing this thread: 1 Guest(s)