Advertisement
Guest User

Untitled

a guest
Sep 5th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public OnGameModeInit()
  2. {
  3. //BOTS & NPC
  4. ConnectNPC("Polizist","policerec");
  5. car_policerec = CreateVehicle(523, 1000.0,1000.0, 1000.0, 0.0, 10, 1, -1);
  6. }
  7.  
  8.  
  9. public OnPlayerConnect(playerid)
  10. {
  11. //NPC BOT ABFRAGE
  12. if(IsPlayerNPC(playerid)) return 1;
  13. }
  14.  
  15.  
  16. public OnPlayerDisconnect(playerid, reason)
  17. {
  18. if(IsPlayerNPC(playerid)) return 1;
  19. return 1;
  20. }
  21.  
  22.  
  23. public OnPlayerSpawn(playerid)
  24. {
  25. //NPC SKIN
  26. if(IsPlayerNPC(playerid))
  27. {
  28. new botname[MAX_PLAYER_NAME];
  29. GetPlayerName(playerid,botname,sizeof(botname));
  30. if(!strcmp(botname,"Polizist",true))
  31. {
  32. PutPlayerInVehicle(playerid, car_policerec, 0);
  33. SetPlayerSkin(playerid,284);
  34. GivePlayerWeapon(playerid,23,1);
  35. SetPlayerVirtualWorld(playerid,0);
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement