Getvehiclenamefromid help
#9

Omg
pawn Код:
CMD:v(playerid, params[])
{
    new getveh[24],color1,color2;
    if(sscanf(params,"s[24]dd",getveh, color1, color2)) return SendClientMessage(playerid, -1, "Syntax: /v <vehicle [Name / ID]>, color1, color2");
    new vehicleID = GetVehicleModelIDFromName(getveh);
    if(vehicleID == (-1)) vehicleID = strval(getveh);
    if(!(400 <= vehicleID <= 611)) SendClientMessage(playerid, 0xAA3333AA, "Invalid vehicle ID/name");
    else{
        if( getveh[playerid] > 0 ) DestroyVehicle(getveh[playerid]);
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        getveh[playerid] = CreateVehicle(vehicleID, x, y, z, 90, color1, color2, 60000);
        PutPlayerInVehicle(playerid, getveh[playerid], 0);
    }
    return 1;
}
// Edit better version xD
Reply


Messages In This Thread
Getvehiclenamefromid help - by -Rebel Son- - 22.03.2011, 06:37
Re: Getvehiclenamefromid help - by -Rebel Son- - 22.03.2011, 16:11
Re: Getvehiclenamefromid help - by alpha500delta - 22.03.2011, 16:38
Re: Getvehiclenamefromid help - by -Rebel Son- - 22.03.2011, 17:47
Re: Getvehiclenamefromid help - by xir - 22.03.2011, 18:04
Re: Getvehiclenamefromid help - by -Rebel Son- - 22.03.2011, 19:23
Re: Getvehiclenamefromid help - by xir - 22.03.2011, 20:21
Re: Getvehiclenamefromid help - by -Rebel Son- - 22.03.2011, 20:32
Re: Getvehiclenamefromid help - by Jefff - 22.03.2011, 20:39
Re: Getvehiclenamefromid help - by -Rebel Son- - 22.03.2011, 22:21

Forum Jump:


Users browsing this thread: 2 Guest(s)