Car Commands Bugging
#5

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
PHP код:
CMD:car(playeridparams[])
{
    new 
car[50],color1,color2,message[75], Float:pPos[4],VehicleID;
    if(
DM[playerid] == 1) return SendClientMessage(playerid, -1,""red"[ ERROR ]: "yellow"You can't use this command while deathmatch!");
    if(
DUEL[playerid] == 1) return SendClientMessage(playerid, -1,""red"[ ERROR]: "yellow"You can't use this command while duel!");
    if(
AccInfo[playerid][Cars] != 0DestroyVehicle(AccInfo[playerid][Cars]);
    if(
sscanf(params,"s[50]D(6)D(0)",car,color1,color2)) SendClientMessage(playerid, -1""red"[ USAGE ]: "yellow"/car [ ID/CARNAME ] [Color 1] [Color 2]");
    else{
        
VehicleID GetVehicleModelIDFromName(car);
        if(
VehicleID == -1)
        {
            
VehicleID strval(car);
            if(
VehicleID 400 || VehicleID 611) return SendClientMessage(playerid, -1""red"[ ERROR ]: "yellow"You entered an invalid vehiclename!");
        }
        new 
Model ReturnVehicleID(params);
        if(
AccInfo[playerid][LesenKereta] == 0)
        {
                if(
Model == INVALID_VEHICLE_ID)
                {
                        if(
strlen(params) > 8params[8] = EOS;
                        
Model strval(params);
                        if(!(
400 <= Model <= 611))
                        return 
SendClientMessage(playerid, -1""red"[ ERROR ]: "yellow"You entered an invalid vehiclename!");
                        
GetPlayerPos(playeridpPos[0], pPos[1], pPos[2]);
                        
GetPlayerFacingAngle(playeridpPos[3]);
                        
AccInfo[playerid][Cars] = CreateVehicle(ModelpPos[0], pPos[1], pPos[2] + 1pPos[3], 0160);
                        
PutPlayerInVehicle(playeridAccInfo[playerid][Cars], 0);
                        
format(messagesizeof(message), ""red"[ UFM ]: "yellow"You have spawned %s[%d]!"GetVehicleNames(AccInfo[playerid][Cars]),VehicleID);
                        
SendClientMessage(playerid, -1message);
                }
        } else{
        
GetPlayerPos(playeridpPos[0], pPos[1], pPos[2]);
        
GetPlayerFacingAngle(playeridpPos[3]);
        
AccInfo[playerid][Cars] = CreateVehicle(ModelpPos[0], pPos[1], pPos[2] + 1pPos[3], 0160);
        
PutPlayerInVehicle(playeridAccInfo[playerid][Cars], 0);
        
format(messagesizeof(message), ""red"[ UFM ]: "yellow"You have spawned %s[%d]!"GetVehicleNames(AccInfo[playerid][Cars]),VehicleID);
        
SendClientMessage(playerid, -1message);
        }
    }
    return 
1;

Why I Can't use the license
Reply


Messages In This Thread
Car Commands Bugging - by dh240473 - 15.07.2016, 09:00
Re: Car Commands Bugging - by TaiRinsuru - 15.07.2016, 09:05
Re: Car Commands Bugging - by dh240473 - 15.07.2016, 09:36
Re: Car Commands Bugging - by FuNkYTheGreat - 15.07.2016, 09:44
Re: Car Commands Bugging - by dh240473 - 15.07.2016, 10:53
Re: Car Commands Bugging - by dh240473 - 15.07.2016, 14:34
Re: Car Commands Bugging - by vikoo - 15.07.2016, 15:25

Forum Jump:


Users browsing this thread: 3 Guest(s)