/car help [ wont detect names ] +rep
#7


pawn Код:
CMD:car(playerid, params[])
{
    if(pData[playerid][pAdmin] >= MODERATOR || IsPlayerAdmin(playerid))
    {
        new aVehicle, Color1, Color2;
        if(sscanf(params, "uI(-1)I(-1)", aVehicle, Color1, Color2)) return SendClientMessage(playerid,color_usage, "[Usage]:"#cwhite" /car [car ID] [ color 1 ] [ color 2 ]");if(veh < 400 || veh > 611) return SendClientMessage(playerid,color_error, "[ Error ]:"#cwhite" This is not a valid vehicle name! Please try again ");
        new veh = GetVehicleModelID(aVehicle); // you see you never called this
        new Float:Pos[4];
        GetPlayerPos(playerid, Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(playerid, Pos[3]);
        if(IsPlayerInAnyVehicle(playerid)) { DestroyVehicle(GetPlayerVehicleID(playerid)); }
        new PVeh = CreateVehicle(veh, Pos[0], Pos[1], Pos[2], Pos[3]+90, Color1, Color2, -1);
        LinkVehicleToInterior(PVeh, GetPlayerInterior(playerid));
        SetVehicleVirtualWorld(PVeh, GetPlayerVirtualWorld(playerid));

        return 1;
    }
    else return aerror(playerid);
}
try this. not tested
Reply


Messages In This Thread
/car help [ wont detect names ] +rep [ solved ] - by RicaNiel - 19.02.2012, 11:02
Re: /car help [ wont detect names ] +rep - by aRoach - 19.02.2012, 11:17
Re: /car help [ wont detect names ] +rep - by emokidx - 19.02.2012, 11:19
Re: /car help [ wont detect names ] +rep - by RicaNiel - 19.02.2012, 11:21
Re: /car help [ wont detect names ] +rep - by emokidx - 19.02.2012, 11:23
Re: /car help [ wont detect names ] +rep - by RicaNiel - 19.02.2012, 11:26
Re: /car help [ wont detect names ] +rep - by emokidx - 19.02.2012, 11:30
Re: /car help [ wont detect names ] +rep - by RicaNiel - 19.02.2012, 11:32
Re: /car help [ wont detect names ] +rep - by emokidx - 19.02.2012, 11:35
Re: /car help [ wont detect names ] +rep - by RicaNiel - 19.02.2012, 11:37

Forum Jump:


Users browsing this thread: 3 Guest(s)