11.01.2012, 17:58
Alright, this isn't any advanced expert code or something, just trying to detect basically, advanced coding will come after this. So I need your help, I got this code and basically it gives no message:
Sending a message AFTER everything (in the end) returns id 0 all the time. Any ideas..My head isn't working today
Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid) { new Float:dis,Float:dis2,str[128]; RepairVehicle(GetPlayerVehicleID(playerid)); ForEach(i,MAX_PLAYERS) { if(i != playerid) { dis = 99999.99; dis2 = GetDistanceBetweenVehicles(playerid,i); if(dis2 < dis && dis2 < 8.0) { if (IsPlayerInAnyVehicle(i)) { if(GetPlayerVehicleID(i) != GetPlayerVehicleID(playerid)) { RepairVehicle(GetPlayerVehicleID(i)); format(str,sizeof(str),"Collider : %s",PlayerName2(i)); SendClientMessage(playerid,COLOR_WHITE,str); } } } } } return 1; }