[Help] Gold Rims
#1

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
Reply
#2

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;
}
Reply
#3

Thanks
Reply
#4

No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)