nick5556 Geplaatst: 29 april 2008 Rapport Geplaatst: 29 april 2008 Hey, Stel: Je hebt gecodeerd dat je random spawnt, en je hebt dat zo gedaan: enum PlayerSpawnInfo { Float:SpawnX, Float:SpawnY, Float:SpawnZ, Float:SpawnA } new Float:SpawnPlaces[][PlayerSpawnInfo] = { {264.5656,1852.7548,8.7578,316.5617}, {261.4799,1871.8197,8.7578,118.5331}, {244.1538,1876.6932,8.7578,4.3103}, {241.1678,1837.7968,6.3516,210.8481}, {243.0274,1818.3099,4.7109,170.0653}, {254.7784,1807.9067,4.7109,48.2009}, {256.0463,1802.2321,7.5052,89.5612}, {236.5994,1802.1357,7.4141,5.6105}, {212.8423,1822.6396,6.4141,274.1163}, {281.5338,1820.3622,4.7104,127.0167}, {297.5332,1840.4692,7.8281,175.4155}, {312.3418,1855.6171,7.8281,242.7828}, {277.5765,1874.4808,8.7578,175.1021}, {264.5656,1852.7548,8.7578,316.5617}, {274.4120,1878.1577,-1.3047,57.2642}, {275.0735,1889.4170,-15.3828,136.5149}, {268.6907,1883.8322,-30.0938,178.1886}, {277.0945,1885.0894,8.4375,96.4546}, {224.7596,1853.9929,12.8458,19.2290}, {234.3233,1932.3949,33.8984,64.4243}, {192.6553,1939.8356,17.6406,269.0563}, {240.8017,1906.1407,18.5154,134.3216}, {264.5432,1891.7048,20.3672,71.9911}, {279.0709,1829.2845,21.4766,65.7243}, {211.5545,1810.7634,21.8672,77.0044}, {142.9904,1831.4360,17.6481,158.9301}, {113.5674,1814.7203,25.4985,95.7812}, {192.4950,1931.1235,17.6406,79.8711}, {190.7490,1940.5381,17.6406,82.3778}, {158.2891,1930.8091,20.4859,52.9241}, {122.9227,1933.0598,22.7578,76.2314} }; En dit erbij: public OnPlayerRequestSpawn(playerid) { ResetSpawnInfo(playerid); return 1; } ResetSpawnInfo(playerid) { new RandPlace = random(sizeof(SpawnPlaces)); new RandWeapon = random(sizeof(SpawnWeapons)); SetSpawnInfo(playerid, 255, 0, SpawnPlaces[RandPlace][SpawnX], SpawnPlaces[RandPlace][SpawnY], SpawnPlaces[RandPlace][SpawnZ], SpawnPlaces[RandPlace][SpawnA], SpawnWeapons[RandWeapon][WeaponID], SpawnWeapons[RandWeapon][WeaponAmmo], 0, 0, 0, 0); return 1; } En iemand kan vantevoren een skin kiezen, hoe zorg ik dan dat: iemand random spawt en evengoed zijn/haar gekozen skin houdt? PS: ik heb in mijn script een heleboel warnings(50) maar ik snap niet watvoor warnings het zijn, dit is er eentje: code erbij: new Float:SpawnWeapons[][PlayerSpawnWeapons] = { {1,0}, // line 95 {3,0}, {4,0}, {5,0}, {8,0}, {9,0}, {16,20}, {18,20}, {22,35}, {24,35}, {26,50}, {27,50}, {29,50}, {30,50}, {34,25}, {42,100}, {37, 50}, {38, 100}, {33, 25} }; en de warning: D:\GTA SA\GTA San Andreas\wip server\gamemodes\deathmatch.pwn(95) : warning 213: tag mismatch D:\GTA SA\GTA San Andreas\wip server\gamemodes\deathmatch.pwn(95) : warning 213: tag mismatch Whats the problem here? Reageren
Recommended Posts
Een reactie plaatsen
Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.