Guest User

Untitled

a guest
Jan 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <a_npc>
  7. #include <a_vehicles>
  8. #include <a_players>
  9.  
  10. #if defined FILTERSCRIPT
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. print("\n--------------------------------------");
  15. print(" Blank Filterscript by your name here");
  16. print("--------------------------------------\n");
  17. return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22. return 1;
  23. }
  24.  
  25. #else
  26.  
  27. main()
  28. {
  29. print("\n----------------------------------");
  30. print(" Blank Gamemode by your name here");
  31. print("----------------------------------\n");
  32. }
  33.  
  34. #endif
  35.  
  36. public OnGameModeInit()
  37. {
  38. // Don't use these lines if it's a filterscript
  39. SetGameModeText("Blank Script");
  40. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  41. return 1;
  42. }
  43.  
  44. public OnGameModeExit()
  45. {
  46. return 1;
  47. }
  48.  
  49. public OnPlayerRequestClass(playerid, classid)
  50. {
  51. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  52. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  53. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  54. return 1;
  55. }
  56.  
  57. public OnPlayerConnect(playerid)
  58. {
  59. return 1;
  60. }
  61.  
  62. public OnPlayerDisconnect(playerid, reason)
  63. {
  64. return 1;
  65. }
  66.  
  67. public OnPlayerSpawn(playerid)
  68. {
  69. return 1;
  70. }
  71.  
  72. public OnPlayerDeath(playerid, killerid, reason)
  73. {
  74. return 1;
  75. }
  76.  
  77. public OnVehicleSpawn(vehicleid)
  78. {
  79. return 1;
  80. }
  81.  
  82. public OnVehicleDeath(vehicleid, killerid)
  83. {
  84. return 1;
  85. }
  86.  
  87. public OnPlayerText(playerid, text[])
  88. {
  89. return 1;
  90. }
  91.  
  92. public OnPlayerCommandText(playerid, cmdtext[])
  93. {
  94. new cmd[128],idx;
  95. cmd=strtok(cmdtext,idx);
  96. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  97. {
  98. // Do something here
  99. return 1;
  100. } else if(strcmp("/spawn",cmdtext,true,strlen("/spawn"))==0){
  101. //Script na spawnovanie auta
  102. new name[MAX_PLAYER_NAME+1];
  103. GetPlayerName(playerid,name,sizeof(name));
  104. if((strcmp("[SvK]Skygo",name)==0)||(strcmp("Separated",name)==0)){
  105. new Float:x;
  106. new Float:y;
  107. new Float:z;
  108. new Float:rot;
  109. new veh=560;
  110. new tmp[128];
  111. tmp=strtok(cmdtext,idx);
  112. if(strlen(tmp)>0){
  113. veh=strval(tmp);
  114. } else veh=560;
  115. GetPlayerFacingAngle(playerid,rot);
  116. GetPlayerPos(playerid,x,y,z);
  117. z=z+10;
  118. SendClientMessage(playerid,0xCCEE12FF,"Vozidlo spawnute");
  119. //SendClientMessage(playerid,0xCCEE12FF,tmp);
  120. CreateVehicle(veh,x,y,z,rot,c1,c2,(60*60*24*365));
  121. } else {
  122. SendClientMessage(playerid,0x40ACEFFF,"Tento prikaz moze pouzit iba admin!");
  123. }
  124. return 1;
  125. } else if(strcmp("/pm",cmdtext,true,strlen("/pm"))==0){
  126. new plid;
  127. new tmpplid[128];
  128. tmpplid=strtok(cmdtext,idx);
  129. if(strlen(tmpplid)>0)
  130. plid=strval(tmpplid);
  131. else return SendClientMessage(playerid,0x40ACEFFF,"Pouzitie: /pm [id hraca] [text]");
  132. new text[256];
  133. text=substr(cmdtext,(strlen(tmpplid)+5));
  134. new msg[500];
  135. new sname[100];
  136. GetPlayerName(playerid,sname,sizeof(sname));
  137. format(msg,sizeof(msg),"[PM:%s]: %s",sname,text);
  138. SendClientMessage(plid,0xFFFF00FF,msg);
  139. return 1;
  140. }
  141. return 0;
  142. }
  143.  
  144. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  145. {
  146. return 1;
  147. }
  148.  
  149. public OnPlayerExitVehicle(playerid, vehicleid)
  150. {
  151. return 1;
  152. }
  153.  
  154. public OnPlayerStateChange(playerid, newstate, oldstate)
  155. {
  156. return 1;
  157. }
  158.  
  159. public OnPlayerEnterCheckpoint(playerid)
  160. {
  161. return 1;
  162. }
  163.  
  164. public OnPlayerLeaveCheckpoint(playerid)
  165. {
  166. return 1;
  167. }
  168.  
  169. public OnPlayerEnterRaceCheckpoint(playerid)
  170. {
  171. return 1;
  172. }
  173.  
  174. public OnPlayerLeaveRaceCheckpoint(playerid)
  175. {
  176. return 1;
  177. }
  178.  
  179. public OnRconCommand(cmd[])
  180. {
  181. return 1;
  182. }
  183.  
  184. public OnPlayerRequestSpawn(playerid)
  185. {
  186. return 1;
  187. }
  188.  
  189. public OnObjectMoved(objectid)
  190. {
  191. return 1;
  192. }
  193.  
  194. public OnPlayerObjectMoved(playerid, objectid)
  195. {
  196. return 1;
  197. }
  198.  
  199. public OnPlayerPickUpPickup(playerid, pickupid)
  200. {
  201. return 1;
  202. }
  203.  
  204. public OnVehicleMod(playerid, vehicleid, componentid)
  205. {
  206. return 1;
  207. }
  208.  
  209. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  210. {
  211. return 1;
  212. }
  213.  
  214. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  215. {
  216. return 1;
  217. }
  218.  
  219. public OnPlayerSelectedMenuRow(playerid, row)
  220. {
  221. return 1;
  222. }
  223.  
  224. public OnPlayerExitedMenu(playerid)
  225. {
  226. return 1;
  227. }
  228.  
  229. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  230. {
  231. return 1;
  232. }
  233.  
  234. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  235. {
  236. return 1;
  237. }
  238.  
  239. public OnRconLoginAttempt(ip[], password[], success)
  240. {
  241. return 1;
  242. }
  243.  
  244. public OnPlayerUpdate(playerid)
  245. {
  246. return 1;
  247. }
  248.  
  249. public OnPlayerStreamIn(playerid, forplayerid)
  250. {
  251. return 1;
  252. }
  253.  
  254. public OnPlayerStreamOut(playerid, forplayerid)
  255. {
  256. return 1;
  257. }
  258.  
  259. public OnVehicleStreamIn(vehicleid, forplayerid)
  260. {
  261. return 1;
  262. }
  263.  
  264. public OnVehicleStreamOut(vehicleid, forplayerid)
  265. {
  266. return 1;
  267. }
  268.  
  269. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  270. {
  271. return 1;
  272. }
  273.  
  274. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  275. {
  276. return 1;
  277. }
  278. strtok(const string[], &index)
  279. {
  280. new length = strlen(string);
  281. while ((index < length) && (string[index] <= ' '))
  282. {
  283. index++;
  284. }
  285.  
  286. new offset = index;
  287. new result[20];
  288. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  289. {
  290. result[index - offset] = string[index];
  291. index++;
  292. }
  293. result[index - offset] = EOS;
  294. return result;
  295. }
  296. substr(const string[],iCount){
  297. new length=strlen(string)-iCount;
  298. new nStr[256];
  299. new c=0;
  300. while(c<length){
  301. nStr[c]=string[iCount+c];
  302. c=c+1;
  303. }
  304. nStr[c]='\0';
  305. return nStr;
  306. }
Add Comment
Please, Sign In to add comment