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

Sooooo
spawning by name doesn't works.
WHY?!

Код:
CMD:v(playerid, params[])
{
    new id;
    new car;
    new Vehicle[32], VehicleID;
    new Float:x, Float:y;
    new Float:x2, Float:y2, Float:z;
    new worldid = GetPlayerVirtualWorld(playerid);
    if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /v [ID/name]");
    if(id > 611 || id < 400)
    {
        return SendClientMessage(playerid, COLOR_GREY,"Error: Bad ID or name.");
    }
    else
    {
        GetXYInFrontOfPlayer(playerid, x, y, 5.0);
        GetPlayerPos(playerid, x2, y2, z);
        car = CreateVehicle(id, x, y, z, 0.0, 255, 255, -1);
        SetVehicleVirtualWorld(car, worldid);
    }
	if(sscanf(params, "s[32]", Vehicle)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /v [ID/name]");
    {
        VehicleID = GetVehicleModelIDFromName(Vehicle);
        GetXYInFrontOfPlayer(playerid, x, y, 5.0);
        GetPlayerPos(playerid, x2, y2, z);
        VehicleID = CreateVehicle(VehicleID, x, y, z, 0.0, 255, 255, -1);
        SetVehicleVirtualWorld(VehicleID, worldid);
    }
    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: 1 Guest(s)