21.08.2014, 00:51
Resulta que tengo el GM base de ZC, entonces intente quitar el /llaves, pero al poner la opcion en onplayerspawn y borrar las cosas que no funcionarian.. todo bien, pero resulta que al logear un player que tiene 5 vehiculos, solo le spawneara el primer vehiculo (Slot 0), entonces necesito una funcion para que al logear todos los vehiculos spawneen no solo el primero.. aqui esta lo que tengo en onplayerspawn.
Код:
for(new listitem = 0; listitem < 8; listitem++) // 10 para 10 slots si tenes muchos coches { if(PlayerVehicleInfo[playerid][listitem][pvImpounded] == 1) return SendClientMessageEx(playerid,COLOR_WHITE,"El auto que intenta spawnear estб embargado."); if(PlayerVehicleInfo[playerid][listitem][pvImpounded] >= 2) PlayerVehicleInfo[playerid][listitem][pvImpounded] = 0; if(PlayerVehicleInfo[playerid][listitem][pvModelId] != 0 && PlayerVehicleInfo[playerid][listitem][pvImpounded] == 0 && PlayerVehicleInfo[playerid][listitem][pvSpawned]== 0) { if(carsforplayer[playerid] == 8) return SendClientMessageEx(playerid,COLOR_WHITE,"."); PlayerCars++; carsforplayer[playerid]++; new carcreated = CreateVehicle(PlayerVehicleInfo[playerid][listitem][pvModelId], PlayerVehicleInfo[playerid][listitem][pvPosX], PlayerVehicleInfo[playerid][listitem][pvPosY], PlayerVehicleInfo[playerid][listitem][pvPosZ], PlayerVehicleInfo[playerid][listitem][pvPosAngle],PlayerVehicleInfo[playerid][listitem][pvColor1], PlayerVehicleInfo[playerid][listitem][pvColor2], -1); PlayerVehicleInfo[playerid][listitem][pvId] = carcreated; VehicleFuel[carcreated] = PlayerVehicleInfo[playerid][listitem][pvFuel]; SetVehicleHealth(carcreated, PlayerVehicleInfo[playerid][listitem][pvHealth]); SetVehicleVirtualWorld(carcreated, PlayerVehicleInfo[playerid][listitem][pvVW]); PlayerVehicleInfo[playerid][listitem][pvSpawned] = 8; if(PlayerVehicleInfo[playerid][listitem][pvLocked] == 1) LockPlayerVehicle(playerid, PlayerVehicleInfo[playerid][listitem][pvId], PlayerVehicleInfo[playerid][listitem][pvLock]); LoadPlayerVehicleMods(playerid, listitem); return 1; } }