Help:How Do I Make This Code Be For admin's Only
#1

Код:
if (!strcmp("/quickrepaircar",cmdtext,true))
		{
		if(IsPlayerInAnyVehicle(playerid))
		{
		SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
		SendClientMessage(playerid,COLOR_GREEN, "Car is repaired.");
		}
		return 1;}
I Want it to work for admins only
Reply
#2

IsPlayerAdmin?
Reply
#3

So instead its

Код:
if (!strcmp("/quickrepaircar",cmdtext,true))
		{
		if(IsPlayeradmin(playerid))
		{
		SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
		SendClientMessage(playerid,COLOR_GREEN, "Car is repaired.");
		}
?
Reply
#4

This may help you.
Reply
#5

pawn Код:
if (!strcmp("/quickrepaircar",cmdtext,true))
    {
    if(IsPlayerAdmin(playerid))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
            SendClientMessage(playerid,COLOR_GREEN, "Car is repaired.");
        }
        return 1;}
    }
Reply
#6

Just remember IsPlayerAdmin is for RCon admins only.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)