i want to use this command only for admin....
#1

please help me friends.....i have this auto repair function in my gamemode.....i want auto reair vehicle for only admin..
or if i want it only auto repair work in race stunt area only its lv.....if auto repair work only in lv....??



SetTimer("AutoR", 1000, 1);
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

public AutoR() {
for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
if(IsPlayerConnected(playerid)) {
new Float:health, cid;
if (IsPlayerInAnyVehicle(playerid)) {
cid = GetPlayerVehicleID(playerid);
GetVehicleHealth(cid, health);
if (health < 300) {
SetVehicleHealth(cid,1000);
GameTextForPlayer(playerid, "Vehicul reparat!",2000,5);
}
}
}
}
return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)