Guest User

Untitled

a guest
Dec 19th, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <FCNPC>
  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 = FCNPC_Create("Josh");
  22.         FCNPC_Spawn(my_npc, 104, 1953.6671, -2444.9656, 13.5391);
  23.         FCNPC_SetAngle(my_npc, 185.6094);
  24.         FCNPC_PutInVehicle(my_npc, npc_car, 0);
  25.         return 1;
  26.     }
  27.     if (!strcmp("/killhim", cmdtext, true))
  28.     {
  29.         FCNPC_SetVehicleHealth(my_npc, 150.0);
  30.         return 1;
  31.     }
  32.     return 0;
  33. }
  34.  
  35. public OnVehicleDeath(vehicleid, killerid)
  36. {
  37.     new string[145];
  38.     format(string, sizeof string, "OnVehicleDeath(vehicleid %d, killerid %d)", vehicleid, killerid);
  39.     SendClientMessageToAll(-1, string);
  40.     return 1;
  41. }
  42.  
  43. public OnVehicleSpawn(vehicleid)
  44. {
  45.     new string[145];
  46.     format(string, sizeof string, "OnVehicleSpawn(vehicleid %d)", vehicleid);
  47.     SendClientMessageToAll(-1, string);
  48.     return 1;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment