Advertisement
Guest User

byronny

a guest
Nov 1st, 2012
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.38 KB | None | 0 0
  1. /*
  2. [PC Filterscript by Ronny16
  3. Dieses Notebook System wurde von Ronny16
  4. Geschrieben. Schaut es euch einfach an.
  5. Ich würde es Cool finden wenn ihr es
  6. Bewerten / Benutzen würdet.
  7. */
  8.  
  9. #include <a_samp>
  10. #include <ocmd>
  11. //=====|Defines|=====//
  12. #define DIALOG_BURGERSHOT 1
  13. #define DIALOG_WAFFENLADEN 2
  14. #define DIALOG_247LADEN 3
  15. #define DIALOG_HMLADEN 4
  16. #define DIALOG_PCKAUFEN 5
  17. //=====|News |=====//
  18. new Text:Textdraw0;
  19. new Text:Textdraw1;
  20. new Text:Textdraw2;
  21. new Text:Textdraw3;
  22. new Text:Textdraw4;
  23. new Text:Textdraw5;
  24. new Text:Textdraw6;
  25. new Text:Textdraw7;
  26. new Text:Textdraw8;
  27. new Text:Textdraw9;
  28. new Text:Textdraw10;
  29. new Text:Textdraw11;
  30. new Text:Textdraw12;
  31. new Text:Textdraw13;
  32. new Text:Textdraw14;
  33. new Text:Textdraw15;
  34. new Text:Textdraw16;
  35. new Text:Textdraw17;
  36. new Text:Textdraw18;
  37.  
  38. enum PlayerInfo
  39. {
  40.  
  41. Adminlevel,
  42. pLaptop, // Ist eigentlich Unwichtig! Da es ey nicht gespeichert / Geladen wird
  43. //Ist halt nur so gedacht das man sich vorher ein Laptop kaufen muss.
  44. //muss nicht benutzt werden. MFG Ronny :D
  45.  
  46. };
  47. new pInfo[MAX_PLAYERS][PlayerInfo];
  48.  
  49. main()
  50. {
  51. print("\n----------------------------------");
  52. print(" Notebook System| By Ronny16|");
  53. print(" Wurde erfolgreich geladen");
  54. print("----------------------------------\n");
  55. }
  56.  
  57. public OnGameModeInit()
  58. {
  59. SetGameModeText("Pc");
  60. AddPlayerClass(53,998.7527,-944.7200,42.0745,78.2254,0,0,0,0,0,0); // Spawn Tankstelle [BSN]
  61. AddStaticPickup(1239, 2, 980.5051,-933.3316,41.3362); // Laptop kaufen
  62. Create3DTextLabel("Laufe ins Pickup",0xFF6E00FF,980.5051,-933.3316,41.3362,10,0,0);
  63. AddStaticVehicleEx(461,998.7527,-944.7200,42.0745,78.2254,22,22,-1); // BallaVehs10
  64. //=====|TextDraws|=====//
  65. print("Laptop Script V.0.1 [2012]");
  66. print("By Ronny16");
  67.  
  68. // Create the textdraws:
  69. Textdraw0 = TextDrawCreate(177.000000, 150.000000, ".");
  70. TextDrawBackgroundColor(Textdraw0, 255);
  71. TextDrawFont(Textdraw0, 1);
  72. TextDrawLetterSize(Textdraw0, 1.759999, 19.300003);
  73. TextDrawColor(Textdraw0, 255);
  74. TextDrawSetOutline(Textdraw0, 0);
  75. TextDrawSetProportional(Textdraw0, 1);
  76. TextDrawSetShadow(Textdraw0, 1);
  77. TextDrawUseBox(Textdraw0, 1);
  78. TextDrawBoxColor(Textdraw0, 255);
  79. TextDrawTextSize(Textdraw0, 446.000000, 8.000000);
  80. TextDrawSetSelectable(Textdraw0,false);
  81.  
  82. Textdraw1 = TextDrawCreate(175.000000, 156.000000, "--------------------------------------------");
  83. TextDrawBackgroundColor(Textdraw1, 255);
  84. TextDrawFont(Textdraw1, 1);
  85. TextDrawLetterSize(Textdraw1, 0.439999, 1.000000);
  86. TextDrawColor(Textdraw1, -1);
  87. TextDrawSetOutline(Textdraw1, 0);
  88. TextDrawSetProportional(Textdraw1, 1);
  89. TextDrawSetShadow(Textdraw1, 1);
  90. TextDrawSetSelectable(Textdraw1,false);
  91.  
  92. Textdraw2 = TextDrawCreate(175.000000, 308.000000, "--------------------------------------------");
  93. TextDrawBackgroundColor(Textdraw2, 255);
  94. TextDrawFont(Textdraw2, 1);
  95. TextDrawLetterSize(Textdraw2, 0.439999, 1.000000);
  96. TextDrawColor(Textdraw2, -1);
  97. TextDrawSetOutline(Textdraw2, 0);
  98. TextDrawSetProportional(Textdraw2, 1);
  99. TextDrawSetShadow(Textdraw2, 1);
  100. TextDrawSetSelectable(Textdraw2,false);
  101.  
  102. Textdraw3 = TextDrawCreate(229.000000, 149.000000, "Notebook bitte waehle etwas aus");
  103. TextDrawBackgroundColor(Textdraw3, 255);
  104. TextDrawFont(Textdraw3, 1);
  105. TextDrawLetterSize(Textdraw3, 0.280000, 1.000000);
  106. TextDrawColor(Textdraw3, 16711935);
  107. TextDrawSetOutline(Textdraw3, 0);
  108. TextDrawSetProportional(Textdraw3, 1);
  109. TextDrawSetShadow(Textdraw3, 1);
  110. TextDrawSetSelectable(Textdraw3,false);
  111.  
  112. Textdraw4 = TextDrawCreate(186.000000, 176.000000, "Burger Shot");
  113. TextDrawBackgroundColor(Textdraw4, 255);
  114. TextDrawFont(Textdraw4, 2);
  115. TextDrawLetterSize(Textdraw4, 0.189999, 1.600000);
  116. TextDrawColor(Textdraw4, -16776961);
  117. TextDrawSetOutline(Textdraw4, 0);
  118. TextDrawSetProportional(Textdraw4, 1);
  119. TextDrawSetShadow(Textdraw4, 1);
  120. TextDrawSetSelectable(Textdraw4,true);
  121.  
  122. Textdraw5 = TextDrawCreate(179.000000, 170.000000, "----------");
  123. TextDrawBackgroundColor(Textdraw5, 255);
  124. TextDrawFont(Textdraw5, 1);
  125. TextDrawLetterSize(Textdraw5, 0.500000, 1.000000);
  126. TextDrawColor(Textdraw5, 16711935);
  127. TextDrawSetOutline(Textdraw5, 0);
  128. TextDrawSetProportional(Textdraw5, 1);
  129. TextDrawSetShadow(Textdraw5, 1);
  130. TextDrawSetSelectable(Textdraw5,false);
  131.  
  132. Textdraw6 = TextDrawCreate(179.000000, 185.000000, "----------");
  133. TextDrawBackgroundColor(Textdraw6, 255);
  134. TextDrawFont(Textdraw6, 1);
  135. TextDrawLetterSize(Textdraw6, 0.500000, 1.000000);
  136. TextDrawColor(Textdraw6, 16711935);
  137. TextDrawSetOutline(Textdraw6, 0);
  138. TextDrawSetProportional(Textdraw6, 1);
  139. TextDrawSetShadow(Textdraw6, 1);
  140. TextDrawSetSelectable(Textdraw6,false);
  141.  
  142. Textdraw7 = TextDrawCreate(370.000000, 170.000000, "----------");
  143. TextDrawBackgroundColor(Textdraw7, 255);
  144. TextDrawFont(Textdraw7, 1);
  145. TextDrawLetterSize(Textdraw7, 0.500000, 1.000000);
  146. TextDrawColor(Textdraw7, 16711935);
  147. TextDrawSetOutline(Textdraw7, 0);
  148. TextDrawSetProportional(Textdraw7, 1);
  149. TextDrawSetShadow(Textdraw7, 1);
  150. TextDrawSetSelectable(Textdraw7,false);
  151.  
  152. Textdraw8 = TextDrawCreate(371.000000, 185.000000, "----------");
  153. TextDrawBackgroundColor(Textdraw8, 255);
  154. TextDrawFont(Textdraw8, 1);
  155. TextDrawLetterSize(Textdraw8, 0.500000, 1.000000);
  156. TextDrawColor(Textdraw8, 16711935);
  157. TextDrawSetOutline(Textdraw8, 0);
  158. TextDrawSetProportional(Textdraw8, 1);
  159. TextDrawSetShadow(Textdraw8, 1);
  160. TextDrawSetSelectable(Textdraw8,false);
  161.  
  162. Textdraw9 = TextDrawCreate(375.000000, 177.000000, "Waffenladen");
  163. TextDrawBackgroundColor(Textdraw9, 255);
  164. TextDrawFont(Textdraw9, 2);
  165. TextDrawLetterSize(Textdraw9, 0.210000, 1.300000);
  166. TextDrawColor(Textdraw9, -16776961);
  167. TextDrawSetOutline(Textdraw9, 0);
  168. TextDrawSetProportional(Textdraw9, 1);
  169. TextDrawSetShadow(Textdraw9, 1);
  170. TextDrawSetSelectable(Textdraw9,true);
  171.  
  172. Textdraw10 = TextDrawCreate(179.000000, 269.000000, "----------");
  173. TextDrawBackgroundColor(Textdraw10, 255);
  174. TextDrawFont(Textdraw10, 1);
  175. TextDrawLetterSize(Textdraw10, 0.500000, 1.000000);
  176. TextDrawColor(Textdraw10, 16711935);
  177. TextDrawSetOutline(Textdraw10, 0);
  178. TextDrawSetProportional(Textdraw10, 1);
  179. TextDrawSetShadow(Textdraw10, 1);
  180. TextDrawSetSelectable(Textdraw10,false);
  181.  
  182. Textdraw11 = TextDrawCreate(179.000000, 286.000000, "----------");
  183. TextDrawBackgroundColor(Textdraw11, 255);
  184. TextDrawFont(Textdraw11, 1);
  185. TextDrawLetterSize(Textdraw11, 0.500000, 1.000000);
  186. TextDrawColor(Textdraw11, 16711935);
  187. TextDrawSetOutline(Textdraw11, 0);
  188. TextDrawSetProportional(Textdraw11, 1);
  189. TextDrawSetShadow(Textdraw11, 1);
  190. TextDrawSetSelectable(Textdraw11,false);
  191.  
  192. Textdraw12 = TextDrawCreate(189.000000, 278.000000, "24/7");
  193. TextDrawBackgroundColor(Textdraw12, 255);
  194. TextDrawFont(Textdraw12, 2);
  195. TextDrawLetterSize(Textdraw12, 0.400000, 1.100000);
  196. TextDrawColor(Textdraw12, -16776961);
  197. TextDrawSetOutline(Textdraw12, 0);
  198. TextDrawSetProportional(Textdraw12, 1);
  199. TextDrawSetShadow(Textdraw12, 1);
  200. TextDrawSetSelectable(Textdraw12,true);
  201.  
  202. Textdraw13 = TextDrawCreate(368.000000, 269.000000, "----------");
  203. TextDrawBackgroundColor(Textdraw13, 255);
  204. TextDrawFont(Textdraw13, 1);
  205. TextDrawLetterSize(Textdraw13, 0.500000, 1.000000);
  206. TextDrawColor(Textdraw13, 16711935);
  207. TextDrawSetOutline(Textdraw13, 0);
  208. TextDrawSetProportional(Textdraw13, 1);
  209. TextDrawSetShadow(Textdraw13, 1);
  210. TextDrawSetSelectable(Textdraw13,false);
  211.  
  212. Textdraw14 = TextDrawCreate(369.000000, 286.000000, "----------");
  213. TextDrawBackgroundColor(Textdraw14, 255);
  214. TextDrawFont(Textdraw14, 1);
  215. TextDrawLetterSize(Textdraw14, 0.500000, 1.000000);
  216. TextDrawColor(Textdraw14, 16711935);
  217. TextDrawSetOutline(Textdraw14, 0);
  218. TextDrawSetProportional(Textdraw14, 1);
  219. TextDrawSetShadow(Textdraw14, 1);
  220. TextDrawSetSelectable(Textdraw14,false);
  221.  
  222. Textdraw15 = TextDrawCreate(372.000000, 278.000000, "Aussehen");
  223. TextDrawBackgroundColor(Textdraw15, 255);
  224. TextDrawFont(Textdraw15, 2);
  225. TextDrawLetterSize(Textdraw15, 0.290000, 1.100000);
  226. TextDrawColor(Textdraw15, -16776961);
  227. TextDrawSetOutline(Textdraw15, 0);
  228. TextDrawSetProportional(Textdraw15, 1);
  229. TextDrawSetShadow(Textdraw15, 1);
  230. TextDrawSetSelectable(Textdraw15,true);
  231.  
  232. Textdraw16 = TextDrawCreate(269.000000, 314.000000, "Ausloggen");
  233. TextDrawBackgroundColor(Textdraw16, 255);
  234. TextDrawFont(Textdraw16, 1);
  235. TextDrawLetterSize(Textdraw16, 0.500000, 1.000000);
  236. TextDrawColor(Textdraw16, -16776961);
  237. TextDrawSetOutline(Textdraw16, 0);
  238. TextDrawSetProportional(Textdraw16, 1);
  239. TextDrawSetShadow(Textdraw16, 1);
  240. TextDrawSetSelectable(Textdraw16,true);
  241.  
  242. Textdraw17 = TextDrawCreate(258.000000, 215.000000, "Windows ~y~7");
  243. TextDrawBackgroundColor(Textdraw17, 255);
  244. TextDrawFont(Textdraw17, 1);
  245. TextDrawLetterSize(Textdraw17, 0.649999, 3.399998);
  246. TextDrawColor(Textdraw17, -1);
  247. TextDrawSetOutline(Textdraw17, 0);
  248. TextDrawSetProportional(Textdraw17, 1);
  249. TextDrawSetShadow(Textdraw17, 1);
  250.  
  251. Textdraw18 = TextDrawCreate(263.000000, 246.000000, "Premium Edition by Ronny");
  252. TextDrawBackgroundColor(Textdraw18, 255);
  253. TextDrawFont(Textdraw18, 1);
  254. TextDrawLetterSize(Textdraw18, 0.310000, 1.100000);
  255. TextDrawColor(Textdraw18, -1);
  256. TextDrawSetOutline(Textdraw18, 0);
  257. TextDrawSetProportional(Textdraw18, 1);
  258. TextDrawSetShadow(Textdraw18, 1);
  259. return 1;
  260. }
  261.  
  262. public OnGameModeExit()
  263. {
  264. return 1;
  265. }
  266.  
  267. public OnPlayerRequestClass(playerid, classid)
  268. {
  269. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  270. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  271. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  272. return 1;
  273. }
  274.  
  275. public OnPlayerConnect(playerid)
  276. {
  277. pInfo[playerid][Adminlevel] = 2000;
  278. return 1;
  279. }
  280.  
  281. public OnPlayerDisconnect(playerid, reason)
  282. {
  283. return 1;
  284. }
  285.  
  286. public OnPlayerSpawn(playerid)
  287. {
  288. return 1;
  289. }
  290.  
  291. public OnPlayerDeath(playerid, killerid, reason)
  292. {
  293. return 1;
  294. }
  295.  
  296. public OnVehicleSpawn(vehicleid)
  297. {
  298. return 1;
  299. }
  300.  
  301. public OnVehicleDeath(vehicleid, killerid)
  302. {
  303. return 1;
  304. }
  305.  
  306. public OnPlayerText(playerid, text[])
  307. {
  308. return 1;
  309. }
  310.  
  311. public OnPlayerCommandText(playerid, cmdtext[])
  312. {
  313. if (strcmp("/Autoteuer", cmdtext, true, 10) == 0)
  314. {
  315. SetPlayerPos(playerid,1235.0052,-1661.7747,11.7969);
  316. return 1;
  317. }
  318. if (strcmp("/Kaufen", cmdtext, true, 10) == 0)
  319. {
  320. if(IsPlayerInRangeOfPoint(playerid,2.0,980.5051,-933.3316,41.3362))
  321. {
  322. new stringnews[1700];
  323. format(stringnews,sizeof(stringnews),"{FEFEFE}Herzlich Willkommen in Ronny,s Pc laden\nMoechten sie sich für {FF3200}50€{FEFEFE} ein Laptop laufen");
  324. ShowPlayerDialog(playerid, DIALOG_PCKAUFEN, DIALOG_STYLE_MSGBOX, "PC-Laden{0FFF00}[By Ronny]{FEFEFE}",stringnews,"Kaufen","Abbrechen");
  325. return 1;
  326. }
  327. else
  328. {
  329. SendClientMessage(playerid,0xEB0000FF,"Du bist nicht im Kauf Pickup!");
  330. return 1;
  331. }
  332. }
  333. if (strcmp("/Leben", cmdtext, true, 10) == 0)
  334. {
  335. SetPlayerHealth(playerid,40);
  336. return 1;
  337. }
  338. if (strcmp("/Geld", cmdtext, true, 10) == 0)
  339. {
  340. GivePlayerMoney(playerid,50000);
  341. return 1;
  342. }
  343. if (strcmp("/Laptop", cmdtext, true, 10) == 0)
  344. {
  345. if(pInfo[playerid][pLaptop] > 0)
  346. {
  347. TogglePlayerControllable ( playerid, false );
  348. Showlaptop(playerid);
  349. SendClientMessage(playerid,0x00FFDCFF,"Du hast dein Laptop gestartet");
  350. TextDrawShowForPlayer(playerid, Textdraw0);
  351. TextDrawShowForPlayer(playerid, Textdraw1);
  352. TextDrawShowForPlayer(playerid, Textdraw2);
  353. TextDrawShowForPlayer(playerid, Textdraw3);
  354. TextDrawShowForPlayer(playerid, Textdraw5);
  355. TextDrawShowForPlayer(playerid, Textdraw6);
  356. TextDrawShowForPlayer(playerid, Textdraw7);
  357. TextDrawShowForPlayer(playerid, Textdraw8);
  358. TextDrawShowForPlayer(playerid, Textdraw10);
  359. TextDrawShowForPlayer(playerid, Textdraw11);
  360. TextDrawShowForPlayer(playerid, Textdraw13);
  361. TextDrawShowForPlayer(playerid, Textdraw14);
  362. TextDrawShowForPlayer(playerid, Textdraw17);
  363. TextDrawShowForPlayer(playerid, Textdraw18);
  364. }
  365. else
  366. {
  367. SendClientMessage(playerid,0xEB0000FF,"Du hast kein Laptop!");
  368. return 1;
  369. }
  370. return 1;
  371. }
  372. return 0;
  373. }
  374.  
  375. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  376. {
  377. return 1;
  378. }
  379.  
  380. public OnPlayerExitVehicle(playerid, vehicleid)
  381. {
  382. return 1;
  383. }
  384.  
  385. public OnPlayerStateChange(playerid, newstate, oldstate)
  386. {
  387. return 1;
  388. }
  389.  
  390. public OnPlayerEnterCheckpoint(playerid)
  391. {
  392. return 1;
  393. }
  394.  
  395. public OnPlayerLeaveCheckpoint(playerid)
  396. {
  397. return 1;
  398. }
  399.  
  400. public OnPlayerEnterRaceCheckpoint(playerid)
  401. {
  402. return 1;
  403. }
  404.  
  405. public OnPlayerLeaveRaceCheckpoint(playerid)
  406. {
  407. return 1;
  408. }
  409.  
  410. public OnRconCommand(cmd[])
  411. {
  412. return 1;
  413. }
  414.  
  415. public OnPlayerRequestSpawn(playerid)
  416. {
  417. return 1;
  418. }
  419.  
  420. public OnObjectMoved(objectid)
  421. {
  422. return 1;
  423. }
  424.  
  425. public OnPlayerObjectMoved(playerid, objectid)
  426. {
  427. return 1;
  428. }
  429.  
  430. public OnPlayerPickUpPickup(playerid, pickupid)
  431. {
  432. if(IsPlayerInRangeOfPoint(playerid,2.0,980.5051,-933.3316,41.3362))//Laptop Kaufen
  433. {
  434. GameTextForPlayer(playerid,"~g~/kaufen",2000,4);
  435. }
  436. return 1;
  437. }
  438.  
  439. public OnVehicleMod(playerid, vehicleid, componentid)
  440. {
  441. return 1;
  442. }
  443.  
  444. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  445. {
  446. return 1;
  447. }
  448.  
  449. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  450. {
  451. return 1;
  452. }
  453.  
  454. public OnPlayerSelectedMenuRow(playerid, row)
  455. {
  456. return 1;
  457. }
  458.  
  459. public OnPlayerExitedMenu(playerid)
  460. {
  461. return 1;
  462. }
  463.  
  464. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  465. {
  466. return 1;
  467. }
  468.  
  469. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  470. {
  471. return 1;
  472. }
  473.  
  474. public OnRconLoginAttempt(ip[], password[], success)
  475. {
  476. return 1;
  477. }
  478.  
  479. public OnPlayerUpdate(playerid)
  480. {
  481. return 1;
  482. }
  483.  
  484. public OnPlayerStreamIn(playerid, forplayerid)
  485. {
  486. return 1;
  487. }
  488.  
  489. public OnPlayerStreamOut(playerid, forplayerid)
  490. {
  491. return 1;
  492. }
  493.  
  494. public OnVehicleStreamIn(vehicleid, forplayerid)
  495. {
  496. return 1;
  497. }
  498.  
  499. public OnVehicleStreamOut(vehicleid, forplayerid)
  500. {
  501. return 1;
  502. }
  503.  
  504. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  505. {
  506. if(dialogid == DIALOG_PCKAUFEN)
  507. {
  508. if(response==0)
  509. {
  510. SendClientMessage(playerid,0xEB0000FF,"Du möchtest dir also kein Laptop kaufen!");
  511. }
  512. if(response==1)
  513. {
  514. if(GetPlayerMoney(playerid) < 50)
  515. {
  516. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}50,00${FF1E00}].");
  517. return 1;
  518. }
  519. SendClientMessage(playerid,0xEB0000FF,"Du hast dir für 50,00$ Ein Laptop gekauft /laptop !");
  520. GivePlayerMoney(playerid,-50);
  521. pInfo[playerid][pLaptop] = 1;
  522. }
  523. }
  524. if(dialogid == DIALOG_HMLADEN)
  525. {
  526. if(response == 1)
  527. {
  528. switch (listitem)
  529. {
  530. case 0://CJ-SKIN 5$
  531. {
  532. if(GetPlayerMoney(playerid) < 5)
  533. {
  534. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}5,00${FF1E00}].");
  535. return 1;
  536. }
  537. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-5,00€{FAFAFA} Den CJ Skin bestellt!");
  538. GivePlayerMoney(playerid,-5);
  539. SetPlayerSkin(playerid,0);
  540. ShowPlayerDialog(playerid, DIALOG_HMLADEN, DIALOG_STYLE_LIST, "{FF6400}H&M-Internetseite{FEFEFE}", "CJ-Skin: 5,00$\nOma-Skin: 10,00$\nGangster-Skin: 15,00$", "Bestellen", "Zurueck");
  541. }
  542. case 1://Oma-SKIN 10$
  543. {
  544. if(GetPlayerMoney(playerid) < 10)
  545. {
  546. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}10,00${FF1E00}].");
  547. return 1;
  548. }
  549. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-10,00€{FAFAFA} Den Oma Skin bestellt!");
  550. GivePlayerMoney(playerid,-10);
  551. SetPlayerSkin(playerid,10);
  552. ShowPlayerDialog(playerid, DIALOG_HMLADEN, DIALOG_STYLE_LIST, "{FF6400}H&M-Internetseite{FEFEFE}", "CJ-Skin: 5,00$\nOma-Skin: 10,00$\nGangster-Skin: 15,00$", "Bestellen", "Zurueck");
  553. }
  554. case 2://Gangster-Skin 15,00$
  555. {
  556. if(GetPlayerMoney(playerid) < 15)
  557. {
  558. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}15,00${FF1E00}].");
  559. return 1;
  560. }
  561. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-15,00€{FAFAFA} Den Gangster Skin bestellt!");
  562. GivePlayerMoney(playerid,-15);
  563. SetPlayerSkin(playerid,21);
  564. ShowPlayerDialog(playerid, DIALOG_HMLADEN, DIALOG_STYLE_LIST, "{FF6400}H&M-Internetseite{FEFEFE}", "CJ-Skin: 5,00$\nOma-Skin: 10,00$\nGangster-Skin: 15,00$", "Bestellen", "Zurueck");
  565. }
  566. }
  567. }
  568. }
  569. if(dialogid == DIALOG_247LADEN)
  570. {
  571. if(response == 1)
  572. {
  573. switch (listitem)
  574. {
  575. case 0://Kippen 5$
  576. {
  577. if(GetPlayerMoney(playerid) < 5)
  578. {
  579. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}5,00${FF1E00}].");
  580. return 1;
  581. }
  582. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-5,00€{FAFAFA} eine Schachtel Kippen bestellt!");
  583. GivePlayerMoney(playerid,-5);
  584. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
  585. ShowPlayerDialog(playerid, DIALOG_247LADEN, DIALOG_STYLE_LIST, "{FF6400}24/7-Internetseite{FEFEFE}", "Kippen: 5$", "Bestellen", "Zurueck");
  586. }
  587. }
  588. }
  589. }
  590. if(dialogid == DIALOG_WAFFENLADEN)
  591. {
  592. if(response == 1)
  593. {
  594. switch (listitem)
  595. {
  596. case 0://Deagle 150$
  597. {
  598. if(GetPlayerMoney(playerid) < 150)
  599. {
  600. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}150,00${FF1E00}].");
  601. return 1;
  602. }
  603. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-150,00€{FAFAFA} eine Deagle bestellt!");
  604. GivePlayerMoney(playerid,-150);
  605. GivePlayerWeapon(playerid,24,50);
  606. ShowPlayerDialog(playerid, DIALOG_WAFFENLADEN, DIALOG_STYLE_LIST, "{FF6400}WL-Internetseite{FEFEFE}", "Deagle: 150$\nMesser: 5,00$\n9mm: 200$\nAK-47: 500$", "Bestellen", "Zurueck");
  607. }
  608. case 1://Messer 5$
  609. {
  610. if(GetPlayerMoney(playerid) < 5)
  611. {
  612. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}5,00${FF1E00}].");
  613. return 1;
  614. }
  615. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-5,00€{FAFAFA} ein Messer bestellt!");
  616. GivePlayerMoney(playerid,-5);
  617. GivePlayerWeapon(playerid,4,1);
  618. ShowPlayerDialog(playerid, DIALOG_WAFFENLADEN, DIALOG_STYLE_LIST, "{FF6400}WL-Internetseite{FEFEFE}", "Deagle: 150$\nMesser: 5,00$\n9mm: 200$\nAK-47: 500$", "Bestellen", "Zurueck");
  619. }
  620. case 2://9mm 200$
  621. {
  622. if(GetPlayerMoney(playerid) < 200)
  623. {
  624. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}200,00${FF1E00}].");
  625. return 1;
  626. }
  627. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-200,00€{FAFAFA} eine 9mm bestellt!");
  628. GivePlayerMoney(playerid,-200);
  629. GivePlayerWeapon(playerid,22,100);
  630. ShowPlayerDialog(playerid, DIALOG_WAFFENLADEN, DIALOG_STYLE_LIST, "{FF6400}WL-Internetseite{FEFEFE}", "Deagle: 150$\nMesser: 5,00$\n9mm: 200$\nAK-47: 500$", "Bestellen", "Zurueck");
  631. }
  632. case 3://Ak47 500$
  633. {
  634. if(GetPlayerMoney(playerid) < 500)
  635. {
  636. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}500,00${FF1E00}].");
  637. return 1;
  638. }
  639. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-500,00€{FAFAFA} eine Ak47 bestellt!");
  640. GivePlayerMoney(playerid,-500);
  641. GivePlayerWeapon(playerid,30,500);
  642. ShowPlayerDialog(playerid, DIALOG_WAFFENLADEN, DIALOG_STYLE_LIST, "{FF6400}WL-Internetseite{FEFEFE}", "Deagle: 150$\nMesser: 5,00$\n9mm: 200$\nAK-47: 500$", "Bestellen", "Zurueck");
  643. }
  644. }
  645. }
  646. }
  647. if(dialogid == DIALOG_BURGERSHOT)
  648. {
  649. if(response == 1)
  650. {
  651. switch (listitem)
  652. {
  653. case 0://Pizza 5$
  654. {
  655. new Float:health;
  656. if(GetPlayerMoney(playerid) < 5)
  657. {
  658. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}5,00${FF1E00}].");
  659. return 1;
  660. }
  661. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-5,00€{FAFAFA} eine Pizza bestellt!");
  662. GivePlayerMoney(playerid,-5);
  663. GetPlayerHealth(playerid,health);
  664. SetPlayerHealth(playerid, health+5);
  665. ShowPlayerDialog(playerid, DIALOG_BURGERSHOT, DIALOG_STYLE_LIST, "{FF6400}BS-Internetseite{FEFEFE}", "Pizza: 5,00$\nCola: 1,00$\nBig-Mag: 10,00$\nBier :1,00$", "Bestellen", "Zurueck");
  666. }
  667. case 1://Cola 1$
  668. {
  669. new Float:health;
  670. if(GetPlayerMoney(playerid) < 1)
  671. {
  672. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}1,00${FF1E00}].");
  673. return 1;
  674. }
  675. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-1,00${FAFAFA} ein Glas Cola bestellt!");
  676. GivePlayerMoney(playerid,-1);
  677. GetPlayerHealth(playerid,health);
  678. SetPlayerHealth(playerid, health+1);
  679. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  680. ShowPlayerDialog(playerid, DIALOG_BURGERSHOT, DIALOG_STYLE_LIST, "{FF6400}BS-Internetseite{FEFEFE}", "Pizza: 5,00$\nCola: 1,00$\nBig-Mag: 10,00$\nBier :1,00$", "Bestellen", "Zurueck");
  681. }
  682. case 2://Big-Mag 10,00$
  683. {
  684. new Float:health;
  685. if(GetPlayerMoney(playerid) < 10)
  686. {
  687. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}10,00${FF1E00}].");
  688. return 1;
  689. }
  690. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-10,00${FAFAFA} ein Big-Mag bestellt!");
  691. GivePlayerMoney(playerid,-10);
  692. GetPlayerHealth(playerid,health);
  693. SetPlayerHealth(playerid, health+10);
  694. ShowPlayerDialog(playerid, DIALOG_BURGERSHOT, DIALOG_STYLE_LIST, "{FF6400}BS-Internetseite{FEFEFE}", "Pizza: 5,00$\nCola: 1,00$\nBig-Mag: 10,00$\nBier :1,00$", "Bestellen", "Zurueck");
  695. }
  696. case 3://Bier 1,00$
  697. {
  698. new Float:health;
  699. if(GetPlayerMoney(playerid) < 1)
  700. {
  701. SendClientMessage(playerid, 0xFF3200FF, "{FF1E00}Du hast nicht genug Geld [{F5FF00}1,00${FF1E00}].");
  702. return 1;
  703. }
  704. SendClientMessage(playerid,0xFAFAFAFF,"Du hast dir für {FF2800}-1,00${FAFAFA} eine Flasche Bier bestellt!");
  705. GivePlayerMoney(playerid,-1);
  706. GetPlayerHealth(playerid,health);
  707. SetPlayerHealth(playerid, health+1);
  708. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  709. ShowPlayerDialog(playerid, DIALOG_BURGERSHOT, DIALOG_STYLE_LIST, "{FF6400}BS-Internetseite{FEFEFE}", "Pizza: 5,00$\nCola: 1,00$\nBig-Mag: 10,00$\nBier :1,00$", "Bestellen", "Zurueck");
  710. }
  711. }
  712. }
  713. }
  714. return 1;
  715. }
  716.  
  717. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  718. {
  719. return 1;
  720. }
  721.  
  722. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  723. {
  724.  
  725. if ( clickedid == Textdraw4 )
  726. {
  727. SendClientMessage(playerid,0xFAFAFAFF,"Willkommen auf der Burger Shot Internet seite");
  728. SendClientMessage(playerid,0xFAFAFAFF,"Hier koennen sie sich etwas Online bestellen");
  729. SendClientMessage(playerid,0xFAFAFAFF,"Bitte weahlen sie ihr bestellung");
  730. ShowPlayerDialog(playerid, DIALOG_BURGERSHOT, DIALOG_STYLE_LIST, "{FF6400}BS-Internetseite{FEFEFE}", "Pizza: 5,00$\nCola: 1,00$\nBig-Mag: 10,00$\nBier :1,00$", "Bestellen", "Zurueck");
  731. return 1;
  732. }
  733. else if ( clickedid == Textdraw9 )
  734. {
  735. SendClientMessage(playerid,0xFAFAFAFF,"Willkommen auf der Internet seite des Waffenladens");
  736. SendClientMessage(playerid,0xFAFAFAFF,"Hier koennen sie sich etwas Online bestellen");
  737. ShowPlayerDialog(playerid, DIALOG_WAFFENLADEN, DIALOG_STYLE_LIST, "{FF6400}WL-Internetseite{FEFEFE}", "Deagle: 150$\nMesser: 5,00$\n9mm: 200$\nAK-47: 500$", "Bestellen", "Zurueck");
  738. return 1;
  739. }
  740. else if ( clickedid == Textdraw12 )
  741. {
  742. SendClientMessage(playerid,0xFAFAFAFF,"Willkommen auf der Internet vom 24/7 Shop");
  743. SendClientMessage(playerid,0xFAFAFAFF,"Hier koennen sie sich etwas Online bestellen");
  744. ShowPlayerDialog(playerid, DIALOG_247LADEN, DIALOG_STYLE_LIST, "{FF6400}24/7-Internetseite{FEFEFE}", "Kippen: 5$", "Bestellen", "Zurueck");
  745. return 1;
  746. }
  747. else if ( clickedid == Textdraw15 )
  748. {
  749. SendClientMessage(playerid,0xFAFAFAFF,"Willkommen auf der Internet von H&M");
  750. SendClientMessage(playerid,0xFAFAFAFF,"Hier koennen sie sich etwas Online bestellen");
  751. ShowPlayerDialog(playerid, DIALOG_HMLADEN, DIALOG_STYLE_LIST, "{FF6400}H&M-Internetseite{FEFEFE}", "CJ-Skin: 5,00$\nOma-Skin: 10,00$\nGangster-Skin: 15,00$", "Bestellen", "Zurueck");
  752. return 1;
  753. }
  754. else if ( clickedid == Textdraw16 )
  755. {
  756. SendClientMessage(playerid,0x00FFDCFF,"Du hast dein Laptop Heruntergefahren");
  757. TextDrawHideForPlayer(playerid,Textdraw0);
  758. TextDrawHideForPlayer(playerid,Textdraw1);
  759. TextDrawHideForPlayer(playerid,Textdraw2);
  760. TextDrawHideForPlayer(playerid,Textdraw3);
  761. TextDrawHideForPlayer(playerid,Textdraw4);
  762. TextDrawHideForPlayer(playerid,Textdraw5);
  763. TextDrawHideForPlayer(playerid,Textdraw6);
  764. TextDrawHideForPlayer(playerid,Textdraw7);
  765. TextDrawHideForPlayer(playerid,Textdraw8);
  766. TextDrawHideForPlayer(playerid,Textdraw9);
  767. TextDrawHideForPlayer(playerid,Textdraw10);
  768. TextDrawHideForPlayer(playerid,Textdraw11);
  769. TextDrawHideForPlayer(playerid,Textdraw12);
  770. TextDrawHideForPlayer(playerid,Textdraw13);
  771. TextDrawHideForPlayer(playerid,Textdraw14);
  772. TextDrawHideForPlayer(playerid,Textdraw15);
  773. TextDrawHideForPlayer(playerid,Textdraw16);
  774. TextDrawHideForPlayer(playerid,Textdraw17);
  775. TextDrawHideForPlayer(playerid,Textdraw18);
  776. TogglePlayerControllable ( playerid, true );
  777. CancelSelectTextDraw (playerid);
  778. return 1;
  779. }
  780. return 1;
  781. }
  782.  
  783. stock Showlaptop(p)
  784. {
  785. TextDrawShowForPlayer ( p, Textdraw4);
  786. TextDrawShowForPlayer ( p, Textdraw9);
  787. TextDrawShowForPlayer ( p, Textdraw12);
  788. TextDrawShowForPlayer ( p, Textdraw15);
  789. TextDrawShowForPlayer ( p, Textdraw16);
  790. SelectTextDraw ( p , 0xFF9600FF );
  791. new x = 0;
  792. for ( ; x<20; x++ ) { SendClientMessage ( p, 0xFFFFFFFF, "" ); }
  793. return 1;
  794. }
  795.  
  796. ocmd:veh(playerid,params[])
  797. {
  798. if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,0xFF1400FF,"Du Hast Kein Adminrang[5].");
  799. new ModelID, color[2],Float:VehPos[4], vehicleid;
  800. if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT) return SendClientMessage(playerid,0xB0AFB0FF,"Du bist nicht zu Fuss");
  801. if(sscanf(params, "ddd",ModelID,color[0],color[1])) return SendClientMessage(playerid,0xB0AFB0FF, "/veh [vehicleid] [color1] [color2]");
  802. if(ModelID < 400 || ModelID > 611) return SendClientMessage(playerid,0xB0AFB0FF, "Die Fahrzeug Id muss von 400 bis 611 sein");
  803. if(color[0] < 0 || color[0] > 126 || color[1] < 0 || color[1] > 126) return SendClientMessage(playerid,0xB0AFB0FF, "the colorid must be between 0 - 126");
  804. if(isPlayerAnAdmin(playerid,3) || CallRemoteFunction("PlayerIsAnAdmin","i",playerid))
  805. {
  806. GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
  807. GetPlayerFacingAngle(playerid, VehPos[3]);
  808. vehicleid = CreateVehicle(ModelID,VehPos[0],VehPos[1],VehPos[2],VehPos[3],color[0],color[1],-1);
  809. LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
  810. SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
  811. PutPlayerInVehicle(playerid, vehicleid, 0);
  812. }
  813. return 1;
  814. }
  815.  
  816. stock isPlayerAnAdmin(playerid,rang)
  817. {
  818. if(pInfo[playerid][Adminlevel]>=rang)return 1;
  819. return 0;
  820. }
  821.  
  822. stock sscanf(sstring[], format[], {Float,_}:...)
  823. {
  824. #if defined isnull
  825. if (isnull(sstring))
  826. #else
  827. if (sstring[0] == 0 || (sstring[0] == 1 && sstring[1] == 0))
  828. #endif
  829. {
  830. return format[0];
  831. }
  832. #pragma tabsize 4
  833. new
  834. formatPos = 0,
  835. sstringPos = 0,
  836. paramPos = 2,
  837. paramCount = numargs(),
  838. delim = ' ';
  839. while (sstring[sstringPos] && sstring[sstringPos] <= ' ')
  840. {
  841. sstringPos++;
  842. }
  843. while (paramPos < paramCount && sstring[sstringPos])
  844. {
  845. switch (format[formatPos++])
  846. {
  847. case '\0':
  848. {
  849. return 0;
  850. }
  851. case 'i', 'd':
  852. {
  853. new
  854. neg = 1,
  855. num = 0,
  856. ch = sstring[sstringPos];
  857. if (ch == '-')
  858. {
  859. neg = -1;
  860. ch = sstring[++sstringPos];
  861. }
  862. do
  863. {
  864. sstringPos++;
  865. if ('0' <= ch <= '9')
  866. {
  867. num = (num * 10) + (ch - '0');
  868. }
  869. else
  870. {
  871. return -1;
  872. }
  873. }
  874. while ((ch = sstring[sstringPos]) > ' ' && ch != delim);
  875. setarg(paramPos, 0, num * neg);
  876. }
  877. case 'h', 'x':
  878. {
  879. new
  880. num = 0,
  881. ch = sstring[sstringPos];
  882. do
  883. {
  884. sstringPos++;
  885. switch (ch)
  886. {
  887. case 'x', 'X':
  888. {
  889. num = 0;
  890. continue;
  891. }
  892. case '0' .. '9':
  893. {
  894. num = (num << 4) | (ch - '0');
  895. }
  896. case 'a' .. 'f':
  897. {
  898. num = (num << 4) | (ch - ('a' - 10));
  899. }
  900. case 'A' .. 'F':
  901. {
  902. num = (num << 4) | (ch - ('A' - 10));
  903. }
  904. default:
  905. {
  906. return -1;
  907. }
  908. }
  909. }
  910. while ((ch = sstring[sstringPos]) > ' ' && ch != delim);
  911. setarg(paramPos, 0, num);
  912. }
  913. case 'c':
  914. {
  915. setarg(paramPos, 0, sstring[sstringPos++]);
  916. }
  917. case 'f':
  918. {
  919.  
  920. new changestr[16], changepos = 0, strpos = sstringPos;
  921. while(changepos < 16 && sstring[strpos] && sstring[strpos] != delim)
  922. {
  923. changestr[changepos++] = sstring[strpos++];
  924. }
  925. changestr[changepos] = '\0';
  926. setarg(paramPos,0,_:floatstr(changestr));
  927. }
  928. case 'p':
  929. {
  930. delim = format[formatPos++];
  931. continue;
  932. }
  933. case '\'':
  934. {
  935. new
  936. end = formatPos - 1,
  937. ch;
  938. while ((ch = format[++end]) && ch != '\'') {}
  939. if (!ch)
  940. {
  941. return -1;
  942. }
  943. format[end] = '\0';
  944. if ((ch = strfind(sstring, format[formatPos], false, sstringPos)) == -1)
  945. {
  946. if (format[end + 1])
  947. {
  948. return -1;
  949. }
  950. return 0;
  951. }
  952. format[end] = '\'';
  953. sstringPos = ch + (end - formatPos);
  954. formatPos = end + 1;
  955. }
  956. case 'u':
  957. {
  958. new
  959. end = sstringPos - 1,
  960. id = 0,
  961. bool:num = true,
  962. ch;
  963. while ((ch = sstring[++end]) && ch != delim)
  964. {
  965. if (num)
  966. {
  967. if ('0' <= ch <= '9')
  968. {
  969. id = (id * 10) + (ch - '0');
  970. }
  971. else
  972. {
  973. num = false;
  974. }
  975. }
  976. }
  977. if (num && IsPlayerConnected(id))
  978. {
  979. setarg(paramPos, 0, id);
  980. }
  981. else
  982. {
  983. #if !defined foreach
  984. #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  985. #define __SSCANF_FOREACH__
  986. #endif
  987. sstring[end] = '\0';
  988. num = false;
  989. new
  990. name[MAX_PLAYER_NAME];
  991. id = end - sstringPos;
  992. foreach (Player, playerid)
  993. {
  994. GetPlayerName(playerid, name, sizeof (name));
  995. if (!strcmp(name, sstring[sstringPos], true, id))
  996. {
  997. setarg(paramPos, 0, playerid);
  998. num = true;
  999. break;
  1000. }
  1001. }
  1002. if (!num)
  1003. {
  1004. setarg(paramPos, 0, INVALID_PLAYER_ID);
  1005. }
  1006. sstring[end] = ch;
  1007. #if defined __SSCANF_FOREACH__
  1008. #undef foreach
  1009. #undef __SSCANF_FOREACH__
  1010. #endif
  1011. }
  1012. sstringPos = end;
  1013. }
  1014. case 's', 'z':
  1015. {
  1016. new
  1017. i = 0,
  1018. ch;
  1019. if (format[formatPos])
  1020. {
  1021. while ((ch = sstring[sstringPos++]) && ch != delim)
  1022. {
  1023. setarg(paramPos, i++, ch);
  1024. }
  1025. if (!i)
  1026. {
  1027. return -1;
  1028. }
  1029. }
  1030. else
  1031. {
  1032. while ((ch = sstring[sstringPos++]))
  1033. {
  1034. setarg(paramPos, i++, ch);
  1035. }
  1036. }
  1037. sstringPos--;
  1038. setarg(paramPos, i, '\0');
  1039. }
  1040. default:
  1041. {
  1042. continue;
  1043. }
  1044. }
  1045. while (sstring[sstringPos] && sstring[sstringPos] != delim && sstring[sstringPos] > ' ')
  1046. {
  1047. sstringPos++;
  1048. }
  1049. while (sstring[sstringPos] && (sstring[sstringPos] == delim || sstring[sstringPos] <= ' '))
  1050. {
  1051. sstringPos++;
  1052. }
  1053. paramPos++;
  1054. }
  1055. do
  1056. {
  1057. if ((delim = format[formatPos++]) > ' ')
  1058. {
  1059. if (delim == '\'')
  1060. {
  1061. while ((delim = format[formatPos++]) && delim != '\'') {}
  1062. }
  1063. else if (delim != 'z')
  1064. {
  1065. return delim;
  1066. }
  1067. }
  1068. }
  1069. while (delim > ' ');
  1070. return 0;
  1071. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement