04.01.2017, 00:34
Why is SCMToAll not working? I meant that you should just print the row count, like this(I edited the code a little, i like itbetter that way):
have u considered updating your MySQL, seems like you are using an older version. You'd have to rework a lot tho(Depending on how much old MySQL code u got).
PHP Code:
forward LoadServerVehicles();
public LoadServerVehicles()
{
new rowCount = cache_get_row_count();
new debugMessage[20];
format(debugMessage, sizeof(debugMessage), "Row count is: %d", rowCount);
SendClientMessageToAll(-1, debugMessage);
for(new row = 0; row < rowCount; row++)
{
new vid = cache_get_field_content_int(row, "ID");
ServerVeh[vid][svModel] = cache_get_field_content_int(row, "Model");
ServerVeh[vid][svX] = cache_get_field_content_float(row, "X");
ServerVeh[vid][svY] = cache_get_field_content_float(row, "Y");
ServerVeh[vid][svZ] = cache_get_field_content_float(row, "Z");
ServerVeh[vid][svA] = cache_get_field_content_float(row, "A");
ServerVeh[vid][svC1] = cache_get_field_content_int(row, "C1");
ServerVeh[vid][svC2] = cache_get_field_content_int(row, "C2");
CreateVehicle(ServerVeh[vid][svModel], ServerVeh[vid][svX], ServerVeh[vid][svY], ServerVeh[vid][svZ], ServerVeh[vid][svA], ServerVeh[vid][svC1], ServerVeh[vid][svC2], -1);
}
return 1;
}