Gold Rims
#1

Hello Guys!

I got a problem, i have script this:

CMD:gr(playerid, params[])
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1 080);
SendClientMessage(playerid, COLOR_TWAQUA, "Gold Rims Added");
return 1;
}


But when i add only for admin it's got error. Can someone do it for me here without any error?

Sorry for bad english
Reply
#2

Let me read your mind about error .... wait wait i know now you will post on bottom post the error you get
Reply
#3

pawn Код:
CMD:gr(playerid, params[])
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
{
AddVehicleComponent(vehicleid, 1080);
SendClientMessage(playerid, COLOR_TWAQUA, "Gold Rims Added");
return 1;
}
Reply
#4

pawn Код:
CMD:gr(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an administrator.");
    AddVehicleComponent(GetPlayerVehicleID(playerid),1 080);
    SendClientMessage(playerid, COLOR_TWAQUA, "Gold Rims Added");
    return 1;
}
If you have an admin variable, replace IsPlayerAdmin(playerid) with it.
Reply
#5

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
pawn Код:
CMD:gr(playerid, params[])
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
{
AddVehicleComponent(vehicleid, 1080);
SendClientMessage(playerid, COLOR_TWAQUA, "Gold Rims Added");
return 1;
}
Please don't post. Test your code and you'll find out why.

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
pawn Код:
CMD:gr(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an administrator.");
    AddVehicleComponent(GetPlayerVehicleID(playerid),1 080);
    SendClientMessage(playerid, COLOR_TWAQUA, "Gold Rims Added");
    return 1;
}
If you have an admin variable, replace IsPlayerAdmin(playerid) with it.
Please note the space It is possible that you will get an error with that as well and then the op will be back with another complaint. Seeing as that is how it goes nowadays.
Reply
#6

lol my bad :P
pawn Код:
CMD:gr(playerid, params[])
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1080);
SendClientMessage(playerid, COLOR_TWAQUA, "Gold Rims Added");
return 1;
}
Reply
#7

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
lol my bad :P
pawn Код:
CMD:gr(playerid, params[])
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1080);
SendClientMessage(playerid, COLOR_TWAQUA, "Gold Rims Added");
return 1;
}
obvious error, COLOR_TWAQUA is not defined.
Reply
#8

Obviously your stupid cant u see he as it color code defined
Reply
#9

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
he has his own colour code smart ass
didnt notice, sorry.
PS: your english sucks donkey ballz.
Reply
#10

Use this one it could work. Just change the "?? ?? ??" To you'r admin level
Код:
CMD:gr(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] <= ??????)
 	{
		return SendClientMessageEx(playerid, COLOR_LIGHTRED, " You are not Authorized to use that command");
	}
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not driving a vehicle.");
	AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
    SendClientMessage(playerid, 0xFFFFFFFF, "You have added Gold Rims to your vehicle.");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)