PAWN Tutorial: Advanced Zombie System (Upgrade)
BUG FIXES: I forgot to return "i" instead of "1" for GetBodySlot(), make sure you return "i" for true, change return 0; to return -1; and under OnRNPCDeath change if(slot == 0) to if(slot == -1). Also, get the npcid's position for the dead body (not the killerid) and add the npcid's facing angle to the dead body or it won't look right plus when changing the roaming points under OnZombieUpdate make sure to also do it in the else statement (I only did the if statement) and change it from 50.0 to 100.0 if zombies stand still while roaming the map. One other thing, put break; or return 1; when you remove the dead body in /stuck to stop the loop from continuing.
** Need support? Join SA-MP Community: https://discord.gg/fugKZrqBth **
✔️ More SA-MP Tutorials: https://www.youtube.com/playlist?list=PLr74cCqGmHljFHP4SyUPodsumnDK-m-vX
new Float:ZombieSpawns[45][3] =
{
//LS (City)
{2436.9968,-1206.0508,33.3668},
{2498.9146,-1766.0397,20.0000},
{2543.2083,-2361.6340,13.6250},
{1870.7198,-2283.2397,13.5469},
{1288.0052,-2014.5758,58.4103},
{1380.2692,-1657.1039,13.4902},
{1592.0880,-1045.7382,23.9063},
{1210.7679,-1100.4723,25.2733},
{1072.5525,-1494.7780,22.7533},
{758.0807,-1242.3280,13.5547},
{614.8104,-1513.3666,14.9626},
{486.5308,-1740.6516,25.8317},
{389.8242,-1397.3784,42.6520},
{689.2192,-920.3643,76.2944},
{1291.1735,-788.4932,96.4609},
//SF (City)
{-2082.9792,-808.0839,66.8750},
{-2015.5428,-112.9194,35.1090},
{-1847.7814,41.8405,44.2031},
{-1504.9374,426.5008,42.3075},
{-1595.4229,751.3098,79.6875},
{-2520.7517,1205.0118,49.0313},
{-2786.8506,783.6300,59.4297},
{-2633.7898,553.1451,47.9766},
{-2726.8972,139.3054,15.6875},
{-2580.6580,-190.8729,23.9878},
{-2121.5068,95.2894,50.5008},
{-2024.6176,857.4490,77.0320},
{-2412.9512,893.3367,81.2656},
{-2301.8547,34.2601,51.8051},
{-1483.6980,-368.6740,15.2960},
//LV (City)
{2068.2156,1230.7018,10.6719},
{2618.8223,1998.3907,10.8203},
{2188.4768,1972.6741,10.8203},
{1971.8514,2427.2080,10.8203},
{1339.9288,2045.1851,10.8203},
{2035.9656,2730.9417,10.8203},
{1603.0934,2284.9214,10.8203},
{1893.4689,2051.0972,10.8203},
{2147.1396,1811.3796,10.8203},
{1975.0859,1622.9075,12.8641},
{2000.6617,1522.2019,17.0682},
{2077.5225,746.1345,10.8125},
{1548.8481,1123.6062,10.8203},
{2607.7502,2295.4224,10.8203},
{2851.9846,2408.4902,10.8203}
};
#SAMP #Tutorial #ZombieSystem