[REP+++](SSCANF)Vehicle Spawn by ID/NAME - Problem!
#2

pawn Код:
CMD:v(playerid, params[])
{
    if(isnull(params) || strlen(params) > 9) SendClientMessage(playerid, COLOR_GREY, "Usage: /v [ID/name]");
    else
    {
        VehicleID = GetVehicleModelIDFromName(params);
        if(!(400 <= VehicleID <= 611))
            VehicleID = strval(params);

        if(!(400 <= VehicleID <= 611)) SendClientMessage(playerid, COLOR_GREY,"Error: Bad ID or name.");
        else{
            new Float:x,Float:y,Floatz:
            GetPlayerPos(playerid, x, y, z);
            GetXYInFrontOfPlayer(playerid, x, y, 5.0);
            VehicleID = CreateVehicle(VehicleID, x, y, z, 0.0, 255, 255, -1);
            SetVehicleVirtualWorld(VehicleID, GetPlayerVirtualWorld(playerid));
        }
    }
    return 1;
}
Reply


Messages In This Thread
[REP+++](SSCANF)Vehicle Spawn by ID/NAME - Problem! - by cnoopers - 18.02.2015, 22:13
Re: [REP+++](SSCANF)Vehicle Spawn by ID/NAME - Problem! - by Jefff - 18.02.2015, 23:22
Re: [REP+++](SSCANF)Vehicle Spawn by ID/NAME - Problem! - by Djole1337 - 19.02.2015, 01:12
Re: [REP+++](SSCANF)Vehicle Spawn by ID/NAME - Problem! - by cnoopers - 19.02.2015, 14:52

Forum Jump:


Users browsing this thread: 2 Guest(s)