Little question about CMD - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little question about CMD (
/showthread.php?tid=352323)
Little question about CMD -
Strech - 19.06.2012
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.
Re: Little question about CMD -
Karl[NDZ] - 19.06.2012
What is the component id?
Re: Little question about CMD -
Revo - 19.06.2012
I have no real understanding of modding cars, but make sure you add a If(IsPlayerInAnyVehicle(playerid)) check.
Re: Little question about CMD -
Skaizo - 19.06.2012
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