11.03.2012, 10:55
(
Последний раз редактировалось Michael@Belgium; 28.03.2012 в 19:46.
)
Previous question solved Thanks to Vince
Next:
Now trying to delete those objects/maps:
I can only create the vehicle once !
That means if i create the object/vehicles -> done
Delete object/vehicles -> done
Create's again objects/vehicles -> fail, it only loads the objects but not the cars.
Next:
Now trying to delete those objects/maps:
pawn Код:
CMD:delmaptest(playerid,params[])
{
new query[256],mapname[64];
if(sscanf(params,"s[64]",mapname)) return SendClientMessage(playerid, -1, "USAGE: /maptest [mapname]");
format(query,sizeof query,"SELECT * FROM `Map_Submits` WHERE MapName = '%s'",mapname);
mysql_query(query);
mysql_store_result();
if(!mysql_num_rows())
{
print("Map doesn't exist");
SendClientMessage(playerid,-1,"Map doesn't exist !");
}
else
{
printf("Deleting objects and cars from map %s",mapname);
for( new x=0; x < MAX_OBJECTS; x++)
{
DestroyObject(tempMapID[x]);
tempMapID[x] = 0;
printf("Deleting object: %i",tempMapID[x]);
}
SendClientMessage(playerid,-1,"Objects deleted");
print("Objects deleted");
for(new y=0;y<MAX_CARS;y++)
{
DestroyVehicle(tempCarID[y]);
tempCarID[y] = 0;
printf("Deleting car: %i",tempCarID[y]);
}
SendClientMessage(playerid,-1,"Cars deleted");
print("Cars deleted");
}
return 1;
}
That means if i create the object/vehicles -> done
Delete object/vehicles -> done
Create's again objects/vehicles -> fail, it only loads the objects but not the cars.