Little question about CMD
#1

Well the problem is i made this: CMD:aspoiler(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF,"ERROR: You must be logged to the rcon in order to use this command.");
AddVehicleComponent(GetPlayerVehicleID(playerid),1 13;
SendClientMessage(playerid, COLOR_TWAQUA, "Enjoy the spoiler!");
return 1;
}

And it shows only on some cars.How to make it show on other cars like the goldrim one.
Reply
#2

What is the component id?
Reply
#3

I have no real understanding of modding cars, but make sure you add a If(IsPlayerInAnyVehicle(playerid)) check.
Reply
#4

like this
pawn Код:
CMD:aspoiler(playerid, params[])
{
     new vehicleid = GetPlayerVehicleID(playerid);
     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x00FF00AA,"You're not in a vehicle.");
     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF,"ERROR: You must be logged to the rcon in order to use this command.");
     AddVehicleComponent(vehicleid, 113);
     SendClientMessage(playerid, COLOR_TWAQUA, "Enjoy the spoiler!");
     return 1;
}
there is componet list id https://sampwiki.blast.hk/wiki/Car_Component_ID
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)