Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public OnPlayerSpawn(playerid)
  2. {
  3. if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  4. {
  5. new npcname[MAX_PLAYER_NAME];
  6. GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
  7. if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
  8. {
  9. PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
  10. }
  11. return 1;
  12. }
  13. //Other stuff for normal players goes here!
  14. return 1;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement