Help: problem unknown vehicle
#1

the problem is the following:

when i type example.. /v vehiclenotfound281

not send the message "Name not found"

but spawn the vehicle... last spawned

code:

pawn Код:
if(isnull(params)) return SendClientMessage(playerid, -1, "use /v vehicle or id");

    sscanf(params, "s[24]", temp_str);

    if(IsNumeric(temp_str))
    {
        temp_id = strval(temp_str) - 400;
    }
    else
    {
        for(new i; i < sizeof(vehicle_list); i++)
        {
            if(strfind(vehicle_list[i], temp_str, true) != -1)
            {
                temp_id = i;

                break;
            }
        }
    }
    if(temp_id < 0 || temp_id > 211) return SendClientMessage(playerid, -1, "Name not found");

    SendClientMessage(playerid, -1, "vehicle spawned!");


    GetPlayerPos(playerid, stat[0], stat[1], stat[2]), GetPlayerFacingAngle(playerid, stat[3]);

    DestroyVehicle(user_vehicle[playerid]);

    if(color[0] == -1) color[0] = random(125);
    if(color[1] == -1) color[1] = random(125);

    user_vehicle[playerid] = CreateVehicle(temp_id + 400, stat[0], stat[1], stat[2], stat[3], color[0], color[1], -1);
    PutPlayerInVehicle(playerid, user_vehicle[playerid], 0);
Reply


Messages In This Thread
Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 11:57
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 15:07
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 15:13
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 15:29
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 18:53
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 19:17
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 20:54
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 21:24
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 22:02
Re: Help: problem unknown vehicle - by NewbieScripter - 21.08.2012, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)