kerts93

npcback.pwn

Jul 9th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.31 KB | None | 0 0
  1. #include <a_samp>
  2. #include <a_npc>
  3.  
  4. new Ambulanceheli;
  5. new Hunter;
  6. new Train;
  7. new AT400;
  8. new CPTbotX1bus;
  9.  
  10. new TablooX1;
  11.  
  12. forward Bot1();
  13. forward Bot2();
  14. forward Bot3();
  15. forward Bot4();
  16. forward Bot5();
  17.  
  18. forward Parool();
  19.  
  20. public OnFilterScriptInit()
  21. {
  22.     print("\n--------------------------------------");
  23.     print(" Botid by kerts93");
  24.     print("--------------------------------------\n");
  25.     SendRconCommand("password 0");
  26.     SetTimer("Bot1", 500, false);
  27.  
  28.     Ambulanceheli = AddStaticVehicle(563, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 6);
  29.     Hunter =    AddStaticVehicle(425, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);
  30.     Train = AddStaticVehicle(538, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
  31.     AT400 = AddStaticVehicle(577, 2109.1763, 1503.0453, 32.2887, 82.2873, 1, 3);
  32.     CPTbotX1bus = AddStaticVehicle(431, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);
  33.  
  34.     TablooX1 = Create3DTextLabel("X1 La Habra",0x66CC00FF,1141.34, -1389.88, 15.06,30.0,0);
  35. }
  36.  
  37. public Bot1()
  38. {
  39.     ConnectNPC("Mathew_McDonald","erthelicopterbot");
  40.     SetTimer("Bot2", 500, false);
  41. }
  42. public Bot2()
  43. {
  44.     ConnectNPC("Moralles_McSmith","hunterbot");
  45.     SetTimer("Bot3", 500, false);
  46. }
  47. public Bot3()
  48. {
  49.     ConnectNPC("Kelroy_Hedges","trainbot");
  50.     SetTimer("Bot4", 500, false);
  51. }
  52. public Bot4()
  53. {
  54.     ConnectNPC("Roy_Sealin","at400bot");
  55.     SetTimer("Bot5", 500, false);
  56. }
  57.  
  58. public Bot5()
  59. {
  60.     ConnectNPC("Mack_Duck","busX1");
  61.     SetTimer("Parool", 500, false);
  62. }
  63.  
  64. public Parool() {
  65.     SendRconCommand("password cApus6A9");
  66. }
  67.  
  68. public OnPlayerSpawn(playerid)
  69. {
  70.     if(!IsPlayerNPC(playerid)) return 0;
  71.  
  72.     new playername[MAX_PLAYER_NAME];
  73.     GetPlayerName(playerid,playername,sizeof(playername));
  74.  
  75.     if(!strcmp(playername,"Mathew_McDonald",true)) {
  76.         PutPlayerInVehicle(playerid, Ambulanceheli, 0);
  77.     }
  78.     else if(!strcmp(playername,"Moralles_McSmith",true)) {
  79.         PutPlayerInVehicle(playerid, Hunter, 0);
  80.     }
  81.     else if(!strcmp(playername,"Kelroy_Hedges",true)) {
  82.         PutPlayerInVehicle(playerid, Train, 0);
  83.     }
  84.     else if(!strcmp(playername,"Roy_Sealin",true)) {
  85.         PutPlayerInVehicle(playerid, AT400, 0);
  86.     }
  87.     else if(!strcmp(playername,"Mack_Duck",true)) {
  88.         PutPlayerInVehicle(playerid, CPTbotX1bus, 0);
  89.          Attach3DTextLabelToVehicle( TablooX1, CPTbotX1bus, 0.0, 0.0, 2.0);
  90.     }
  91.     return 1;
  92. }
Advertisement
Add Comment
Please, Sign In to add comment