Advertisement
Guest User

17110-17250

a guest
May 23rd, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.22 KB | None | 0 0
  1. {
  2. IndiRightOn[vehicleid] = true;
  3. //Kierunkowskaz Prawy Przedni
  4. IndicatorsObject[vehicleid][0] = CreateObject(19294,0,0,0,0,0,0,80);
  5. AttachObjectToVehicle(IndicatorsObject[vehicleid][0], vehicleid, Indicators[i][PXPP], Indicators[i][PYPP], Indicators[i][PZPP], 0, 0, 0);
  6. //Kierunkowskaz Prawy Tylny
  7. IndicatorsObject[vehicleid][1] = CreateObject(19294,0,0,0,0,0,0,80);
  8. AttachObjectToVehicle(IndicatorsObject[vehicleid][1], vehicleid, Indicators[i][PXPT], Indicators[i][PYPT], Indicators[i][PZPT], 0, 0, 0);
  9. }else
  10. {
  11. IndiRightOn[vehicleid] = false;
  12. DestroyObject(IndicatorsObject[vehicleid][0]);
  13. DestroyObject(IndicatorsObject[vehicleid][1]);
  14. }
  15. }
  16. }
  17. }
  18. }
  19.  
  20. if(newkeys == 1332)
  21. {
  22. new vid = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
  23. GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
  24.  
  25. if(vid == INVALID_VEHICLE_ID)
  26. return 1;
  27.  
  28. if(lights == VEHICLE_PARAMS_OFF)
  29. {
  30. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  31. SetVehicleParamsEx(vid, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
  32. SendClientMessage(playerid,COLOR_LIGHTGREEN,"Zapaliłeś Światła!");
  33. }
  34. else
  35. {
  36. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  37. SetVehicleParamsEx(vid, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
  38. SendClientMessage(playerid,COLOR_LIGHTRED,"Zgasiłeś Światła!");
  39. }
  40. }
  41. return 1;
  42. }
  43. public SendMessageToPolicja(color, string[])
  44. {
  45. for(new i = 0; i < MAX_PLAYERS; i++)
  46. {
  47. if(IsPlayerConnected(i))
  48. {
  49. if(gTeam[i] == TEAM_POLICJA)
  50. {
  51. SendClientMessage(i, color, string);
  52. }
  53. }
  54. }
  55. return 1;
  56. }
  57.  
  58. public SetupPlayerForClassSelection(playerid)
  59. {
  60. SetPlayerPos(playerid, player_x,player_y,player_z);
  61. SetPlayerFacingAngle(playerid, player_angle);
  62. SetPlayerCameraPos(playerid, camera_x,camera_y,camera_z);
  63. SetPlayerCameraLookAt(playerid, player_x,player_y,player_z);
  64. ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing. It's most fitting to the music
  65. PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238); //music, duh
  66. //making sure the timer gets executed only once, so the camera doesn't go to fast
  67. if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", moving_speed, true, "i", playerid);
  68. PlayerInfo[playerid][SpawnDance] = false; //preventing the timer to execute again
  69. return 1;
  70. } //something I
  71.  
  72. stock GetPlayerDistanceToPoint(playerid,Float:x,Float:y) //By Sacky (Edited by Smugller)
  73. {
  74. new Float:x1,Float:y1,Float:z1;
  75. GetPlayerPos(playerid,x1,y1,z1);
  76. return floatround(floatsqroot((x-x1)*(x-x1)+(y-y1)*(y-y1)));
  77. }
  78. #pragma unused strrest
  79. #pragma unused strtok
  80.  
  81. strrest(const string[], index)
  82. {
  83. new length = strlen(string),offset = index,result[256];
  84. while ((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r'))
  85. {
  86. result[index - offset] = string[index];index++;
  87. }
  88. result[index - offset] = EOS;
  89. return result;
  90. }
  91.  
  92. stock GetPlayerSpeedd(playerid){
  93. new Float:ST[4];
  94. if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]); else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
  95. ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 169;
  96. return floatround(ST[3]);
  97. }
  98.  
  99. public GetDistanceBetweenPlayers(playerid,playerid2){
  100. new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  101. new Float:dis;
  102. if (!IsPlayerConnected(playerid) || !IsPlayerConnected(playerid2)){
  103. return 0;
  104. }
  105. GetPlayerPos(playerid,x1,y1,z1);
  106. GetPlayerPos(playerid2,x2,y2,z2);
  107. dis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  108. return floatround(dis);
  109. }
  110. public BOT() {
  111. SendClientMessageToAll(COLOR_WHITE," ");
  112. SendClientMessageToAll(COLOR_WHITE," ");
  113. SendClientMessageToAll(COLOR_WHITE," ");
  114. SendClientMessageToAll(COLOR_WHITE," ");
  115. SendClientMessageToAll(COLOR_WHITE," ");
  116. SendClientMessageToAll(COLOR_WHITE," ");
  117. SendClientMessageToAll(COLOR_WHITE," ");
  118. SendClientMessageToAll(COLOR_WHITE," ");
  119. SendClientMessageToAll(COLOR_WHITE," ");
  120. SendClientMessageToAll(COLOR_WHITE," ");
  121. SendClientMessageToAll(COLOR_WHITE," ");
  122. SendClientMessageToAll(COLOR_WHITE," ");
  123. SendClientMessageToAll(COLOR_WHITE," ");
  124. SendClientMessageToAll(COLOR_WHITE," ");
  125. SendClientMessageToAll(COLOR_WHITE," ");
  126. SendClientMessageToAll(COLOR_WHITE," ");
  127. SendClientMessageToAll(COLOR_BLUE,"{ADFF2F}[{FF0000}P{FFFFFF}T{FF0000}R{ADFF2F}]{ADFF2F}{C0C0C0}-|-{C0C0C0}{4169E1}Czat Wyczyszczony{4169E1}{C0C0C0}-|-{C0C0C0}");
  128. SendClientMessageToAll(COLOR_WHITE," ");
  129. SendClientMessageToAll(COLOR_WHITE," ");
  130. }
  131.  
  132. stock GetNearestObjectEx(playerid, model, Float:Distance2 = 1000.0)
  133. {
  134. Distance2 = floatabs(Distance2);
  135. if(Distance2 == 0.0) Distance2 = 1000.0;
  136. new Float:X[2], Float:Y[2], Float:Z[2];
  137. new Float:NearestPos = Distance2;
  138. new NearestVehicle = 0;
  139. GetPlayerPos(playerid, X[0], Y[0], Z[0]);
  140. for(new i; i < MAX_OBIECTS; i++)
  141. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement