ServerFehler

Untitled

Nov 30th, 2020
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. enum intInfo{
  2. b_name[128],
  3. Float:b_x,
  4. Float:b_y,
  5. Float:b_z,
  6. Float:b_a,
  7. Float:b_ix,
  8. Float:b_iy,
  9. Float:b_iz,
  10. Float:b_ia,
  11. b_interior,
  12. intmapmarker
  13. }
  14. new bInfo[][intInfo] = {
  15. {"Stadthalle",1481.0609,-1771.0409,18.7958, 384.808624,173.804992,1008.382812,3,38},
  16. {"24/7",1833.4705,-1842.6001,13.5781,270.6994,-25.884498,-185.868988,1003.546875,270.6994,17,32}
  17. };
  18.  
  19. OnGameModeInit:
  20.  
  21. for(new i=0;i<sizeof(bInfo);i++)
  22. {
  23. new string[250],string2[250];
  24. CreatePickup(1318,1,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z],-1);
  25. CreatePickup(1318,1,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz],-1);
  26. format(string,sizeof(string),"%s Eingang u zu interagieren\nbenutze die Eingabetaste",bInfo[i][b_name]);
  27. Create3DTextLabel(string,COLOR_WHITE,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z],40,0,1);
  28. format(string2,sizeof(string2),"%s Ausgang um zu interagieren\nbenutze die Eingabetaste",bInfo[i][b_name]);
  29. Create3DTextLabel(string,COLOR_WHITE,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz],40,i,1);
  30. CreateDynamicMapIcon(bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z],bInfo[i][intmapmarker],-1,-1,-1,-1,-1,MAPICON_LOCAL);
  31. }
  32.  
  33. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  34. {
  35. //Interrior
  36. if(newkeys & KEY_SECONDARY_ATTACK)
  37. {
  38. if(enterexit[playerid]!=0)return 1;
  39. for(new i=0;i<sizeof(bInfo);i++)
  40. {
  41. if(IsPlayerInRangeOfPoint(playerid,2,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z]))
  42. {
  43. SetPlayerPos(playerid,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz]);
  44. SetPlayerVirtualWorld(playerid,bInfo[i][b_interior]);
  45. SetPlayerVirtualWorld(playerid,i);
  46. SetPlayerFacingAngle(playerid,bInfo[i][b_ia]);
  47. enterexit[playerid]=2;
  48. return 1;
  49. }
  50. if(IsPlayerInRangeOfPoint(playerid,2,bInfo[i][b_ix],bInfo[i][b_iy],bInfo[i][b_iz]))
  51. {
  52. if(GetPlayerVirtualWorld(playerid)!=i)continue;
  53. SetPlayerPos(playerid,bInfo[i][b_x],bInfo[i][b_y],bInfo[i][b_z]);
  54. SetPlayerVirtualWorld(playerid,0);
  55. SetPlayerVirtualWorld(playerid,0);
  56. SetPlayerFacingAngle(playerid,bInfo[i][b_a]);
  57. enterexit[playerid]=2;
  58. return 1;
  59. }
  60.  
  61. }
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment