Nemtom mûködni fog e, de majd meglátjuk:
Script tetejére:
[pawn]new bool:MessageSent[MAX_PLAYERS];
new VHP[MAX_PLAYERS][MAX_VEHICLES] = 0;[/pawn]
OnPlayerConnect alá:
MessageSent[playerid] = false;
SetTimerEx(\"VehHP\",1000,1,\"i\",playerid);
Script aljára:
forward VehHP(playerid);
public VehHP(playerid)
{
new hp;
new vehid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehid,hp);
VHP[playerid][vehid] = hp;
SetTimerEx(\"VehHP2\",500,1,\"i\",playerid);
return 1;
}
forward VehHP2(playerid);
public VehHP2(playerid)
{
new hp;
new vehid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehid,hp);
if(hp < VHP[playerid][vehid] && MessageSent[playerid] == false)
{
SendClientMessage(playerid,0xFF0000FF,\"Ütköztél!\");
MessageSent[playerid] = true;
}
else return 0;
return 1;
}