22.01.2011, 02:54
Hey guys, i was continuing me rcxd system and well something isnt working quite well.
Well its not working at all.
When i enter a rc car and automattically set my car health to 799.0 it dosen't destroy my vehicle and input a message idk why?
any one know why? heres my timer:
Well its not working at all.
When i enter a rc car and automattically set my car health to 799.0 it dosen't destroy my vehicle and input a message idk why?
any one know why? heres my timer:
pawn Код:
SetTimer("CheckRCXD", 500, 1);
pawn Код:
public CheckRCXD()
{
new Float: VehHealth, currentveh;
LoopPlayers(i)
{
if(GetPlayerVehicleID(i) == 411)
{
currentveh = GetPlayerVehicleID(i);
GetVehicleHealth(currentveh, VehHealth);
if(VehHealth < 800.0)
{
if(IsInRCXD[i] == true) {
SendClientMessage(i, COLOR_YELLOW, "Your RC-XD has exploded");
}
DestroyVehicle(currentveh);
}
}
}
return 1;
}