[Help] Gold Rims - 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: [Help] Gold Rims (
/showthread.php?tid=391522)
[Help] Gold Rims -
AchievementMaster360 - 10.11.2012
So i got this filterscript
Код:
#include <a_samp>
#include <zcmd>
#define COLOR_TWAQUA 0x00FFFFAA
public OnFilterScriptInit()
{
print("Welcome to my gold rims filterscript");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
CMD:goldrims(playerid, params[])
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
SendClientMessage(playerid, COLOR_TWAQUA, "The vehicle has recieved gold rims.");
return 1;
}
I want to make this command for rcon admins only and if you are not in a car i want it to say you are not in a vehicle, thanks
AW: [Help] Gold Rims -
Skimmer - 10.11.2012
Try this
pawn Код:
CMD:goldrims(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command.");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You aren't in any vehicle.");
AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
SendClientMessage(playerid, COLOR_TWAQUA, "The vehicle has recieved gold rims.");
return 1;
}
Re: [Help] Gold Rims -
AchievementMaster360 - 10.11.2012
Thanks
AW: [Help] Gold Rims -
Skimmer - 10.11.2012
No problem.