Advertisement
Guest User

Wafffllesss

a guest
Dec 23rd, 2009
1,524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.38 KB | None | 0 0
  1. /*
  2. Timers per player: 1*
  3. Timer per Zombie: 3*
  4.  
  5. *Playing constantly.
  6. =====================================================================================================
  7. This is the Zombie Filterscript by Wafffllesss ( Henrique Pauli ). This is my first Filterscript
  8. And My first npc work. I hope you enjoy this filterscript and make much fun in your server.
  9. Please do not remove the credits.
  10.  
  11. *You can mod this filterscript as you wish.
  12. *You can use this filterscript in anywhere you want to.
  13. =====================================================================================================
  14. */
  15.  
  16. // The Zombie Skin.
  17. // -1: Will random by the skins defined below.
  18. // -2: Will random by any valid game skin.
  19. // Any other number will set the skin as you defined ( if valid ).
  20. #define Zombie_Skin -2
  21.  
  22. //The zombies name. Eg.: If the npc have Zombie in the name, then he'll be a zombie ( Change as you wish ).
  23. #define ZOMBIE_NAME "Zombie"
  24.  
  25. #include <a_samp>
  26. #include <foreach> // By Y_less
  27. Itter_Create(Vehicle, MAX_VEHICLES);
  28.  
  29.  
  30. #define COLOR_GREY 0xAFAFAFAA
  31. #define COLOR_GREEN 0x33AA33AA
  32. #define COLOR_RED 0xAA3333AA
  33. #define COLOR_YELLOW 0xFFFF00AA
  34. #define COLOR_WHITE 0xFFFFFFAA
  35.  
  36.  
  37. forward CheckCloserPlayers(playerid);
  38. forward NewPos(playerid);
  39. forward CheckHP(playerid);
  40. forward KilledBy(playerid,killer);
  41. forward KickZombie(playerid);
  42. forward Firing(playerid);
  43.  
  44. // If Zombie_Skin is equal to -1 then will random this skins:
  45. new ZombieSkins[]={
  46. 1,
  47. 7,
  48. 9,
  49. 10,
  50. 45
  51. // Atention, the last skin doesn't have comma.
  52. };
  53.  
  54.  
  55. enum ZombieEnum{
  56. ZombieSpawned,
  57. ZombieTarget,
  58. ZombieRunning,
  59. ZombieKilling,
  60. NPTIMER,
  61. Ztimers,
  62. Float:LastZombieHealth,
  63. Dying,
  64. HPtimer
  65. }
  66. new Zombies[200][ZombieEnum];
  67.  
  68. new FiringTimer[200];
  69. new FiringClick[200];
  70.  
  71. new ZombieKill[200];
  72.  
  73. new Caller;
  74. new LastAdded = 0;
  75.  
  76. new WeaponDamage[] = {
  77. 1,
  78. 2,
  79. 4,
  80. 4,
  81. 5,
  82. 4,
  83. 4,
  84. 4,
  85. 6,
  86. 15,
  87. -5,
  88. -5,
  89. -5,
  90. -5,
  91. -100,
  92. 4,
  93. 13,
  94. 2,
  95. 13,
  96. 0,
  97. 0,
  98. 0,
  99. 8,
  100. 9,
  101. 11,
  102. 15,
  103. 17,
  104. 15,
  105. 8,
  106. 9,
  107. 13,
  108. 13,
  109. 6,
  110. 45,
  111. 55,
  112. 40,
  113. 40,
  114. 27,
  115. 35,
  116. 0,
  117. 0,
  118. 0,
  119. 0,
  120. 0,
  121. 0,
  122. 0
  123. };
  124. new Float:WeaponRanges[] = {
  125. 1.0,
  126. 1.0,
  127. 1.2,
  128. 1.2,
  129. 1.1,
  130. 1.2,
  131. 1.2,
  132. 1.3,
  133. 1.2,
  134. 1.3,
  135. 0.5,
  136. 0.5,
  137. 0.5,
  138. 0.5,
  139. 0.5,
  140. 1.4,
  141. 12.0,
  142. 12.0,
  143. 12.0,
  144. 0.0,
  145. 0.0,
  146. 0.0,
  147. 28.0,
  148. 29.0,
  149. 30.0,
  150. 26.0,
  151. 25.0,
  152. 27.0,
  153. 28.0,
  154. 31.0,
  155. 35.0,
  156. 35.0,
  157. 26.0,
  158. 38.0,
  159. 65.0,
  160. 40.0,
  161. 40.0,
  162. 23.0,
  163. 37.0,
  164. 0.0,
  165. 0.0,
  166. 0.0,
  167. 0.0,
  168. 0.0,
  169. 0.0,
  170. 0.0
  171. };
  172. public OnFilterScriptInit()
  173. {
  174. // If there is players / Npcs / Vehicles online, it'll create the Itter.
  175. for(new i =0; i<= MAX_PLAYERS;i++){
  176. if(IsPlayerConnected(i) && !IsPlayerNPC(i)){
  177. Itter_Add(Player,i);
  178. FiringTimer[i] = SetTimerEx("Firing",250,1,"i",i);
  179. ZombieKill[i] = -1;
  180. }
  181. else if(IsPlayerConnected(i) && IsPlayerNPC(i)){
  182. Itter_Add(Bot,i);
  183.  
  184. //If he's a zombie. Activate him.
  185. if(!strfind(PlayerName(i),ZOMBIE_NAME,true)){
  186. SetupZombie(i);
  187. }
  188. }
  189. }
  190. new Float:h;
  191. for(new v=0;v<MAX_VEHICLES;v++){
  192. GetVehicleHealth(v,h);
  193. if(h)Itter_Add(Vehicle,v);
  194. }
  195. print("\n=====================================");
  196. print(" Zombie Filterscript By Wafffllesss ");
  197. print("=====================================\n");
  198. return 1;
  199. }
  200.  
  201. //=======================================[ Timers ]=========================================//
  202. public Firing(playerid){
  203. new up_dw,lf_rg,o_keys,weapon;
  204. new Float:x,Float:y,Float:z;
  205.  
  206. weapon = GetPlayerWeapon(playerid);
  207. GetPlayerKeys(playerid,o_keys,up_dw,lf_rg);
  208. if(o_keys == KEY_FIRE || o_keys == (KEY_FIRE+128) ){
  209. if(!FiringClick[playerid] || Automatic(weapon))
  210. {
  211. FiringClick[playerid] = true;
  212. GetPlayerPos(playerid,x,y,z);
  213. foreach(Bot,b){
  214. if(IsPlayerFacingPlayer(playerid,b,5.0)){
  215. if(IsPlayerInRangeOfPoint(b,WeaponRanges[weapon],x,y,z)){
  216. Zombies[b][LastZombieHealth] -= float(WeaponDamage[weapon]);
  217. //printf("%f",Zombies[b][LastZombieHealth]);
  218. if(Zombies[b][LastZombieHealth] <= 0.0 && !Zombies[b][Dying]){
  219. SendDeathMessage(playerid,b,weapon);
  220. Zombies[b][Dying] = true;
  221. }
  222. }
  223. }
  224. }
  225. }
  226. }else{
  227. FiringClick[playerid] = false;
  228. }
  229. }
  230. public KickZombie(playerid){
  231. Kick(playerid);
  232. Zombies[playerid][Dying]=false;
  233. KillTimer(Zombies[playerid][HPtimer]); Zombies[playerid][HPtimer] = false;
  234. KillTimer(Zombies[playerid][Ztimers]); Zombies[playerid][Ztimers] = false;
  235. if(Zombies[playerid][NPTIMER]){
  236. KillTimer(Zombies[playerid][NPTIMER]);
  237. Zombies[playerid][NPTIMER] = false;
  238. }
  239. }
  240. public CheckHP(playerid){ // Check the Zombie HP.
  241. new Float:x,Float:y,Float:z;
  242. new cp = GetClosestPlayer(playerid);
  243.  
  244. if(IsPlayerInAnyVehicle(cp)){
  245. new cpc = GetPlayerVehicleID(cp);
  246. GetVehiclePos(cpc,x,y,z);
  247. GetXYInFrontOfVehicle(cpc,x,y,1.5);
  248. if(IsPlayerInRangeOfPoint(playerid,2.0,x,y,z) && GetPlayerSpeed(cp) > 10.0){
  249. Zombies[playerid][LastZombieHealth] -= (GetPlayerSpeed(cp)*2);
  250. }
  251. }
  252. if( Zombies[playerid][LastZombieHealth] <= 0.0 && Zombies[playerid][ZombieSpawned]){
  253. ApplyAnimation(playerid,"Knife","KILL_Knife_Ped_Die",1,0,1,0,0,0);
  254. SetTimerEx("KickZombie",1500,0,"i",playerid);
  255. Zombies[playerid][Dying] = true;
  256. }
  257. }
  258.  
  259. public NewPos(playerid){ // Make the zombie Run / Sprint
  260. if( Zombies[playerid][LastZombieHealth] > 0.0 ){
  261. new Float:x,Float:y,Float:z;
  262. new Float:ax,Float:ay,Float:az,Float:dif;
  263. GetPlayerPos(Zombies[playerid][ZombieTarget],ax,ay,az);
  264. GetPlayerPos(playerid,x,y,z);
  265. if( az <= (z+3.0) && az >= (z-3.0)){
  266. if(Zombies[playerid][ZombieRunning] == 1){
  267. ApplyAnimation(playerid,"Muscular","MuscleRun",1,1,1,0,0,0);
  268. GetXYInFrontOfPlayer(playerid,x,y,2.0);
  269. }
  270. else if(Zombies[playerid][ZombieRunning] == 2){
  271. ApplyAnimation(playerid,"Muscular","MuscleSprint",1,1,1,0,0,0);
  272. GetXYInFrontOfPlayer(playerid,x,y,2.8);
  273. }
  274.  
  275. dif = az;
  276. SetPlayerPos(playerid,x,y,dif);
  277. }else{
  278. if(Zombies[playerid][ZombieRunning]) Parar(playerid);
  279. GetPlayerPos(playerid,x,y,z);
  280. SetPlayerPosFindZ(playerid,x,y,z);
  281. }
  282. }
  283. }
  284. public CheckCloserPlayers(playerid){ // Detect the closest player and chase him
  285. if( Zombies[playerid][LastZombieHealth] > 0.0 ){
  286. new cp = GetClosestPlayer(playerid);
  287. new Float:MinDistance = 3.0;
  288. if(IsPlayerInAnyVehicle(cp)){ MinDistance = 5.0; }
  289. Zombies[playerid][ZombieTarget] = cp;
  290. if(GetDistanceToPlayer(playerid,cp) <= 70.0 && GetDistanceToPlayer(playerid,cp) > 15.0){
  291. IrParaPlayer(1,playerid,cp);
  292. }else if(GetDistanceToPlayer(playerid,cp) <= 15.0 && GetDistanceToPlayer(playerid,cp) > MinDistance){
  293. IrParaPlayer(0,playerid,cp);
  294. }else if(GetDistanceToPlayer(playerid,cp) <= MinDistance){
  295. Parar(playerid);
  296. }
  297. if(GetDistanceToPlayer(playerid,cp) <= MinDistance){
  298. new Float:h;
  299. if(IsPlayerInAnyVehicle(cp)){
  300. new cpc = GetPlayerVehicleID(cp);
  301. GetVehicleHealth(cpc,h);
  302. if(GetDistanceToPlayer(playerid,cp) < MinDistance){
  303. SetVehicleHealth(cpc,h-80.0);
  304. ApplyAnimation(playerid,"Gangs","shake_carSH",1,1,1,0,0,0);
  305. }
  306.  
  307. }else{
  308. GetPlayerHealth(cp,h);
  309. if(GetDistanceToPlayer(playerid,cp) > 1.5){
  310. SetPlayerHealth(cp,h-5.0);
  311. }else{
  312. if(!Zombies[playerid][ZombieKilling]){
  313. if(!IsDying(cp)){
  314. FinishHim(playerid,cp);
  315. }
  316. }
  317. }
  318. }
  319. }
  320. }
  321. }
  322. public KilledBy(playerid,killer){ // Apply 'dying' animation and kill the player.
  323. if(Zombies[killer][ZombieKilling] == playerid){
  324. ApplyAnimation(playerid,"Knife","KILL_Knife_Ped_Die",1,0,1,0,0,0);
  325. TogglePlayerControllable(playerid,true);
  326. SetPlayerHealth(playerid,0.0);
  327. ClearAnimations(killer);
  328. ZombieKill[playerid] = killer;
  329. }
  330. }
  331. //=======================================[ Functions ]=========================================//
  332. stock Automatic(weaponid){
  333. switch(weaponid){
  334. case 9,22,23,24,27,28,29,30,31,32,37,38: return true;
  335. }
  336. return false;
  337. }
  338. stock IsDying(playerid){ // Verify if a zombie is killing the player
  339. foreach(Bot,b){
  340. if(Zombies[b][ZombieKilling] == playerid) return true;
  341. }
  342. return false;
  343. }
  344. stock SetupZombie(playerid){ // Activate the zombie.
  345. new Float:px,Float:py,Float:pz;
  346. Zombies[playerid][HPtimer] = SetTimerEx("CheckHP",100,1,"i",playerid);
  347. Zombies[playerid][Ztimers] = SetTimerEx("CheckCloserPlayers",1000,1,"i",playerid);
  348. GetPlayerPos(Caller,px,py,pz);
  349. SetPlayerPos(playerid,px,py,pz);
  350. Zombies[playerid][ZombieRunning] = false;
  351. SendClientMessageToAll(COLOR_RED,"A Zombie Connected!");
  352.  
  353. new Zskin=1;
  354. if(Zombie_Skin == -1){
  355. new rd = random(sizeof(ZombieSkins));
  356. if(IsValidSkin(ZombieSkins[rd])){
  357. Zskin = ZombieSkins[rd];
  358. }
  359. }else if(Zombie_Skin == -2){
  360. new rd = random(299);
  361. if(IsValidSkin(rd)){
  362. Zskin = rd;
  363. }
  364. }else if(IsValidSkin(Zombie_Skin)){
  365. Zskin = Zombie_Skin;
  366. }
  367. SetPlayerSkin(playerid,Zskin);
  368.  
  369. Zombies[playerid][ZombieSpawned] = true;
  370. Zombies[playerid][LastZombieHealth] = 100.0;
  371. }
  372.  
  373. stock FinishHim(playerid,target){ // Do i need to explain that?
  374. Zombies[playerid][ZombieKilling] = target;
  375. TogglePlayerControllable(target,false);
  376. SetPlayerToFacePlayer(playerid,target);
  377. SetPlayerToFacePlayer(target,playerid);
  378.  
  379. ApplyAnimation(target,"Knife","KILL_Knife_Ped_Damage",1,0,1,0,0,0);
  380. ApplyAnimation(playerid,"Knife","KILL_Knife_Player",1,0,1,0,0,0);
  381. SetTimerEx("KilledBy",1500,0,"ii",target,playerid);
  382. }
  383.  
  384. stock Parar(playerid){ // Makes the zombie stop walking.
  385. if(Zombies[playerid][ZombieRunning]){
  386. if(Zombies[playerid][NPTIMER]){
  387. KillTimer(Zombies[playerid][NPTIMER]);
  388. Zombies[playerid][NPTIMER] = false;
  389. }
  390. Zombies[playerid][ZombieRunning] = false;
  391. ClearAnimations(playerid);
  392. }
  393. }
  394.  
  395. stock IrParaPlayer(modo,playerid,paraid){ //Make the zombie chase the targeted player. Mode: 1- Run | 2- Sprint
  396. SetPlayerToFacePlayer(playerid,paraid);
  397. if(modo == 0 && Zombies[playerid][ZombieRunning] != 1) Caminhar(playerid);
  398. else if(modo == 1 && Zombies[playerid][ZombieRunning] != 2) Correr(playerid);
  399. }
  400.  
  401. stock Caminhar(playerid){ //Run forward.
  402. Zombies[playerid][ZombieRunning] = 1;
  403. Zombies[playerid][NPTIMER] = SetTimerEx("NewPos",400,1,"i",playerid);
  404. }
  405.  
  406. stock Correr(playerid){ //Sprint forward.
  407. Zombies[playerid][ZombieRunning] = 2;
  408. Zombies[playerid][NPTIMER] = SetTimerEx("NewPos",300,1,"i",playerid);
  409. }
  410.  
  411. stock AlvoDeAlguem(alvoid){ // Check if the player is target from any zombie.
  412. foreach(Bot,b){
  413. if(Zombies[b][ZombieTarget] == alvoid) return b;
  414. }
  415. return false;
  416. }
  417.  
  418. stock KickZombies(){ //Kick All Zombies.
  419. foreach(Bot,b){
  420. if(!strfind(PlayerName(b),ZOMBIE_NAME,true)){
  421. SetTimerEx("KickZombie",1,0,"i",b);
  422. }
  423. }
  424. }
  425. stock SetPlayerToFacePlayer(playerid, targetid) // From a_angles.inc ( Tannz0rz )
  426. {
  427.  
  428. new
  429. Float:pX,
  430. Float:pY,
  431. Float:pZ,
  432. Float:X,
  433. Float:Y,
  434. Float:Z,
  435. Float:ang;
  436.  
  437. if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetid)) return 0;
  438.  
  439. GetPlayerPos(targetid, X, Y, Z);
  440. GetPlayerPos(playerid, pX, pY, pZ);
  441.  
  442. if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  443. else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
  444. else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  445.  
  446. if(X > pX) ang = (floatabs(floatabs(ang) + 180.0));
  447. else ang = (floatabs(ang) - 180.0);
  448.  
  449. SetPlayerFacingAngle(playerid, ang);
  450.  
  451. return 0;
  452.  
  453. }
  454.  
  455. stock PlayerName(playerid){
  456. new pname[MAX_PLAYER_NAME];
  457. GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
  458. return pname;
  459. }
  460.  
  461. stock Float:GetDistanceToPlayer(playerid,playerid2) {
  462. new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  463. if (!IsPlayerConnected(playerid) || !IsPlayerConnected(playerid2)) {
  464. return -1.00;
  465. }
  466. GetPlayerPos(playerid,x1,y1,z1);
  467. GetPlayerPos(playerid2,x2,y2,z2);
  468. return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  469. }
  470.  
  471. stock GetClosestPlayer(p1){
  472. new Float:dis,Float:dis2,playerid;
  473. playerid = -1;
  474. dis = 99999.99;
  475. foreach(Player,x){
  476. if(x != 0)
  477. {
  478. dis2 = GetDistanceToPlayer(p1,x);
  479. if (dis2 < dis && dis2 != -1.00)
  480. {
  481. dis = dis2;
  482. playerid = x;
  483. }
  484. }
  485. }
  486. //printf("[%d]%s",playerid,PlayerName(playerid));
  487. return playerid;
  488. }
  489. stock Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  490. {
  491. new Float:a;
  492. GetPlayerPos(playerid, x, y, a);
  493. if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  494. else GetPlayerFacingAngle(playerid, a);
  495. x += (distance * floatsin(-a, degrees));
  496. y += (distance * floatcos(-a, degrees));
  497. return a;
  498. }
  499.  
  500. stock IsValidSkin(skinid) // Not mine. Do not remmeber who did it.
  501. {
  502. #define MAX_BAD_SKINS 22
  503. new badSkins[MAX_BAD_SKINS] =
  504. { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289 };
  505. if (skinid < 0 || skinid > 299) return false;
  506. for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; }
  507. #undef MAX_BAD_SKINS
  508. return 1;
  509. }
  510.  
  511. stock Float:GetPlayerSpeed(playerid) // Not mine. Do not remmember who did it. (It dosn't return the right speed, but works for what I need.)
  512. {
  513. new Float:vX, Float:vY, Float:vZ;
  514. if (!IsPlayerInAnyVehicle(playerid))
  515. {
  516. GetPlayerVelocity(playerid, vX, vY, vZ);
  517. }
  518. else
  519. {
  520. GetVehicleVelocity(GetPlayerVehicleID(playerid), vX, vY, vZ);
  521. }
  522. return floatsqroot(vX*vX + vY*vY + vZ*vZ)*100;
  523. }
  524. stock Float:GetXYInFrontOfVehicle(vehicleid, &Float:x, &Float:y, Float:distance)
  525. {
  526. new Float:a;
  527. GetVehiclePos(vehicleid, x, y, a);
  528. GetVehicleZAngle(vehicleid, a);
  529. x += (distance * floatsin(-a, degrees));
  530. y += (distance * floatcos(-a, degrees));
  531. return a;
  532. }
  533. stock IsPlayerFacingPlayer(playerid, playerid2, Float:dOffset) // From a_angles.inc ( Tannz0rz )
  534. {
  535.  
  536. new
  537. Float:X,
  538. Float:Y,
  539. Float:Z,
  540. Float:pX,
  541. Float:pY,
  542. Float:pZ,
  543. Float:pA,
  544. Float:ang;
  545.  
  546. if(!IsPlayerConnected(playerid)) return 0;
  547.  
  548. GetPlayerPos(playerid2, pX, pY, pZ);
  549. GetPlayerPos(playerid, X, Y, Z);
  550. GetPlayerFacingAngle(playerid, pA);
  551.  
  552. if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  553. else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);
  554. else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);
  555.  
  556. if(AngleInRangeOfAngle(-ang, pA, dOffset)) return true;
  557.  
  558. return false;
  559. }
  560.  
  561. stock AngleInRangeOfAngle(Float:a1, Float:a2, Float:range) // From a_angles.inc ( Tannz0rz )
  562. {
  563.  
  564. a1 -= a2;
  565. if((a1 < range) && (a1 > -range)) return true;
  566.  
  567. return false;
  568.  
  569. }
  570. //=======================================[ Callbacks ]=========================================//
  571.  
  572. public OnFilterScriptExit()
  573. {
  574. KickZombies();
  575. return 1;
  576. }
  577.  
  578. public OnPlayerConnect(playerid)
  579. {
  580. if(IsPlayerNPC(playerid)){ SpawnPlayer(playerid); }
  581. else{ FiringTimer[playerid] = SetTimerEx("Firing",250,1,"i",playerid);}
  582. return 1;
  583. }
  584.  
  585. public OnPlayerDisconnect(playerid, reason)
  586. {
  587. if(!IsPlayerNPC(playerid)){
  588. KillTimer(FiringTimer[playerid]);
  589. }
  590. return 1;
  591. }
  592.  
  593. public OnPlayerSpawn(playerid)
  594. {
  595. if(IsPlayerNPC(playerid)){
  596. if(!strfind(PlayerName(playerid),ZOMBIE_NAME,true)){
  597. SetupZombie(playerid);
  598. }
  599. }
  600. if(ZombieKill[playerid] != -1){
  601. Zombies[ZombieKill[playerid]][ZombieKilling] = false;
  602. ZombieKill[playerid] = -1;
  603. return 1;
  604. }
  605. return 1;
  606. }
  607.  
  608. public OnPlayerDeath(playerid, killerid, reason)
  609. {
  610. if(ZombieKill[playerid] != -1){
  611. SendDeathMessage(ZombieKill[playerid],playerid,reason);
  612. return 1;
  613. }
  614. return 1;
  615. }
  616.  
  617. public OnVehicleSpawn(vehicleid)
  618. {
  619. return 1;
  620. }
  621.  
  622. public OnVehicleDeath(vehicleid, killerid)
  623. {
  624. return 1;
  625. }
  626.  
  627. public OnPlayerText(playerid, text[])
  628. {
  629. return 1;
  630. }
  631.  
  632. public OnPlayerCommandText(playerid, cmdtext[])
  633. {
  634. if(strcmp(cmdtext, "/zombie", true) == 0) {
  635. if(!IsPlayerAdmin(playerid)) return false;
  636. Caller = playerid;
  637. new newname[64];
  638. format(newname,sizeof(newname),"%s_%d",ZOMBIE_NAME,LastAdded);
  639. ConnectNPC(newname,"zombie");
  640. LastAdded++;
  641. return 1;
  642. }
  643. return 0;
  644. }
  645.  
  646. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  647. {
  648. return 1;
  649. }
  650.  
  651. public OnPlayerExitVehicle(playerid, vehicleid)
  652. {
  653. return 1;
  654. }
  655.  
  656. public OnPlayerStateChange(playerid, newstate, oldstate)
  657. {
  658. return 1;
  659. }
  660.  
  661. public OnPlayerEnterCheckpoint(playerid)
  662. {
  663. return 1;
  664. }
  665.  
  666. public OnPlayerLeaveCheckpoint(playerid)
  667. {
  668. return 1;
  669. }
  670.  
  671. public OnPlayerEnterRaceCheckpoint(playerid)
  672. {
  673. return 1;
  674. }
  675.  
  676. public OnPlayerLeaveRaceCheckpoint(playerid)
  677. {
  678. return 1;
  679. }
  680.  
  681. public OnRconCommand(cmd[])
  682. {
  683. return 1;
  684. }
  685.  
  686. public OnPlayerRequestSpawn(playerid)
  687. {
  688. return 1;
  689. }
  690.  
  691. public OnObjectMoved(objectid)
  692. {
  693. return 1;
  694. }
  695.  
  696. public OnPlayerObjectMoved(playerid, objectid)
  697. {
  698. return 1;
  699. }
  700.  
  701. public OnPlayerPickUpPickup(playerid, pickupid)
  702. {
  703. return 1;
  704. }
  705.  
  706. public OnVehicleMod(playerid, vehicleid, componentid)
  707. {
  708. return 1;
  709. }
  710.  
  711. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  712. {
  713. return 1;
  714. }
  715.  
  716. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  717. {
  718. return 1;
  719. }
  720.  
  721. public OnPlayerSelectedMenuRow(playerid, row)
  722. {
  723. return 1;
  724. }
  725.  
  726. public OnPlayerExitedMenu(playerid)
  727. {
  728. return 1;
  729. }
  730.  
  731. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  732. {
  733. return 1;
  734. }
  735.  
  736. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  737. {
  738. return 1;
  739. }
  740.  
  741. public OnRconLoginAttempt(ip[], password[], success)
  742. {
  743. return 1;
  744. }
  745.  
  746. public OnPlayerUpdate(playerid)
  747. {
  748. return 1;
  749. }
  750.  
  751. public OnPlayerStreamIn(playerid, forplayerid)
  752. {
  753. return 1;
  754. }
  755.  
  756. public OnPlayerStreamOut(playerid, forplayerid)
  757. {
  758. return 1;
  759. }
  760.  
  761. public OnVehicleStreamIn(vehicleid, forplayerid)
  762. {
  763. return 1;
  764. }
  765.  
  766. public OnVehicleStreamOut(vehicleid, forplayerid)
  767. {
  768. return 1;
  769. }
  770.  
  771. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  772. {
  773. return 1;
  774. }
  775.  
  776. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  777. {
  778. return 1;
  779. }
  780.  
  781. //=======================================[ End of the File ]=========================================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement