vehicle help
#1

Hello, I have a problem with this.

pawn Код:
COMMAND:vgoto(playerid,params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >=1) {
    new vid;
    if(sscanf(params, "d", vid)) return SendClientMessage(playerid, Yellow, "Usage: /gotov <vehicleid>");
    new Float:x, Float:y, Float:z, vw;
    GetVehiclePos(vid,x,y,z);
    vw = GetVehicleVirtualWorld(vid);
    SetPlayerVirtualWorld(playerid,vw);
    if(GetPlayerState(playerid) == 2)
    {
        new pvid = GetPlayerVehicleID(playerid);
        SetVehiclePos(pvid,x,y,z);
        SetVehicleVirtualWorld(pvid,vw);
    }
    else SetPlayerPos(playerid,x,y,z+1);
    } else if(PlayerInfo[playerid][pAdminLevel] == 0) return 0;
    return 1;
}
Can anyone show how to make a code where you cant goto a vehicle which doesnt exists?
Reply


Messages In This Thread
vehicle help - by fissekarl - 06.04.2011, 15:03
Re: vehicle help - by Hornet600 - 06.04.2011, 15:09
Re: vehicle help - by fissekarl - 06.04.2011, 15:18
Re: vehicle help - by RoboN1X - 06.04.2011, 15:27
Re: vehicle help - by fissekarl - 06.04.2011, 15:28
Re: vehicle help - by RoboN1X - 06.04.2011, 15:30
Re: vehicle help - by fissekarl - 06.04.2011, 15:32
Re: vehicle help - by Hitman-97- - 06.04.2011, 15:35
Re: vehicle help - by fissekarl - 06.04.2011, 15:43
Re: vehicle help - by RoboN1X - 06.04.2011, 16:08

Forum Jump:


Users browsing this thread: 4 Guest(s)