14.08.2016, 10:07
Title.
It doesnt do the reloadvehicle, and doesnt send the "Have been respawned".
The vehicle isnt occupied and the owner isnt nobody.
What's the problem here?
PHP код:
/* ============================================================================= */
forward RespawnAllCars1();
public RespawnAllCars1()
{
new query[256];
format(query,sizeof(query),"SELECT * from vehicles");
mysql_tquery(connection,query,"RespawnAllCars","");
return 1;
}
/* ============================================================================= */
forward RespawnAllCars();
public RespawnAllCars()
{
for(new i=0; i<cache_get_row_count(); i++)
{
new vid = cache_get_field_content_int(i, "id");
if(IsVehicleOccupied(vid)) return 1;
else if(!strcmp(Vehicle[vid][vOwner], "Nobody")) return 1;
ReloadVehicle(vid);
}
SendClientMessageToAll(-1,"{FFC300}Unoccupied vehicles have been respawned.");
return 1;
}
/* ============================================================================= */
The vehicle isnt occupied and the owner isnt nobody.
What's the problem here?