undefined Posted September 2, 2014 Share Posted September 2, 2014 Hi guys. Im work on the spawn system. But i have a problem. When the player wasted, the vehicle created for only wasted player. Where is the problem? Server-Side local area69SpawnLocation = { {425, 306, 2020, 32, 20, 90, 306, 2020, 17.6, 285}, {425, 306, 2000, 32, 20, 90, 306, 2000, 17.6, 285}, {425, 306, 1980, 32, 20, 90, 306, 1980, 17.6, 285}, {425, 306, 1960, 32, 20, 90, 306, 1960, 17.6, 285}, {425, 306, 1940, 32, 20, 90, 306, 1940, 17.6, 285}, {425, 306, 1920, 32, 20, 90, 306, 1920, 17.6, 285} } addEventHandler( "onPlayerWasted", root, function(totalAmmo, killer, killerWeapon, bodypart, stealth) local k = math.random(#area69SpawnLocation) setTimer(createSpawnVehicle, 13500, 1, area69SpawnLocation[k][1], area69SpawnLocation[k][2], area69SpawnLocation[k][3], area69SpawnLocation[k][4], area69SpawnLocation[k][5], area69SpawnLocation[k][6], source, area69SpawnLocation[k][7], area69SpawnLocation[k][8], area69SpawnLocation[k][9], area69SpawnLocation[k][10]) end) addEventHandler( "onPlayerLogin", root, function( ) local k = math.random(#area69SpawnLocation) createSpawnVehicle( area69SpawnLocation[k][1], area69SpawnLocation[k][2], area69SpawnLocation[k][3], area69SpawnLocation[k][4], area69SpawnLocation[k][5], area69SpawnLocation[k][6], source, area69SpawnLocation[k][7], area69SpawnLocation[k][8], area69SpawnLocation[k][9], area69SpawnLocation[k][10]) end) function createSpawnVehicle(model, vehX, vehY, vehUpZ, vehDownZ, rotation, player, playerX, playerY, playerZ, skinID) triggerClientEvent(player, "createSpawnVehicle", root, model, vehX, vehY, vehUpZ, vehDownZ, rotation, player, playerX, playerY, playerZ, skinID) end Client-Side function createSpawnVehicle(model, vehX, vehY, vehUpZ, vehDownZ, rotation, player, playerX, playerY, playerZ, skinID) vehicle = createVehicle(model, vehX, vehY, vehUpZ, 0, 0, rotation) end addEvent("createSpawnVehicle", true) addEventHandler("createSpawnVehicle", getRootElement(), createSpawnVehicle) Link to comment
Bonsai Posted September 2, 2014 Share Posted September 2, 2014 When the player wasted, the vehicle created for only wasted player. Again please Link to comment
undefined Posted September 2, 2014 Author Share Posted September 2, 2014 When the someone player dead, this function is create the vehicle. But this vehicle only for showing dead player, so only 1 player. Are you understand? Link to comment
Bonsai Posted September 2, 2014 Share Posted September 2, 2014 You create the vehicle clientside, thats why only 1 player can see it. Make that stuff happening on serverside. Link to comment
Recommended Posts