11.02.2011, 06:11
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;
}
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;
}