Guest User

Untitled

a guest
Dec 19th, 2025
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.15 KB | None | 0 0
  1. #include <a_samp>
  2. #include <omp_npc>
  3.  
  4. main(){}
  5.  
  6. new npc_car;
  7.  
  8. public OnGameModeInit()
  9. {
  10.     AddPlayerClass(0, 1954.0790, -2451.3960, 13.5391, 7.6344, 0, 0, 0, 0, 0, 0);
  11.     npc_car = CreateVehicle(542, 1960.1898, -2489.5659, 13.5391, 87.2660, 130, 138, -1);
  12.     return 1;
  13. }
  14.  
  15. new my_npc;
  16.  
  17. public OnPlayerCommandText(playerid, cmdtext[])
  18. {
  19.     if (!strcmp("/npc", cmdtext, true))
  20.     {
  21.         my_npc = NPC_Create("Josh");
  22.         NPC_Spawn(my_npc);
  23.         NPC_SetSkin(my_npc, 104);
  24.         NPC_SetPos(my_npc, 1953.6671, -2444.9656, 13.5391);
  25.         NPC_SetFacingAngle(my_npc, 185.6094);
  26.         NPC_PutInVehicle(my_npc, npc_car, 0);
  27.         return 1;
  28.     }
  29.     if (!strcmp("/killhim", cmdtext, true))
  30.     {
  31.         NPC_SetVehicleHealth(my_npc, 150.0);
  32.         return 1;
  33.     }
  34.     return 0;
  35. }
  36.  
  37. public OnVehicleDeath(vehicleid, killerid)
  38. {
  39.     new string[145];
  40.     format(string, sizeof string, "OnVehicleDeath(vehicleid %d, killerid %d)", vehicleid, killerid);
  41.     SendClientMessageToAll(-1, string);
  42.     return 1;
  43. }
  44.  
  45. public OnVehicleSpawn(vehicleid)
  46. {
  47.     new string[145];
  48.     format(string, sizeof string, "OnVehicleSpawn(vehicleid %d)", vehicleid);
  49.     SendClientMessageToAll(-1, string);
  50.     return 1;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment