03.08.2013, 17:57
(
Последний раз редактировалось RafaelZam; 03.08.2013 в 20:41.
Причина: solved
)
-solved-
lock if you can lock this
lock if you can lock this
PASTEBIN | #1 paste tool since 2002 create new paste tools api archive faq PASTEBIN create new paste trending pastes sign up login my alerts my settings my profile Don't like ads? PRO users don't see any ads ;-) Public Pastes Untitled1 sec ago Untitled2 sec ago startupLua | 6 sec ago Jailbreak25 sec ago Untitled13 sec ago Untitled11 sec ago Untitled15 sec ago ser_137555491198916 sec ago 0 0 Guest VIP System, v1.3 By: a guest on Aug 18th, 2012 | syntax: None | size: 47.54 KB | hits: 680 | expires: Never download | raw | embed | report abuse | print 1. #if defined VIP 2. xxSPEEDYxx's V.I.P System - NEW* 3. 3 Levels 4. v2.0 5. COMMANDS - [v1.0]: 6. 7. V.I.P Level 1 Commands: V.I.P Level 2 Commands: V.I.P Level 3 Commands: 8. /mytime /vsaveskin /vkick 9. /myweather /dontuseskin /vget 10. /myvw /vweapons /rw 11. /mycolor /vipgoto /maxammo 12. /vspec /vasay + V.I.P level 1&2 CMDS 13. /vspecoff + V.I.P level 1 CMDS 14. /spawnme 15. /vcmds 16. 17. COMMANDS - [v2.0]: 18. 19. V.I.P Level 1 Commands: V.I.P Level 2 Commands: V.I.P Level 3 Commands: 20. /ltc[1 - 13] /vipgod /vannounce 21. /viphouse 22. /godcar 23. /vcar 24. /vspa( V.I.P Special Actions! ) 25. /stophold! 26. 27. V.I.P over 35 command! OMG! 28. 29. #endif 30. 31. //============ [ Includes ] ============// 32. #include < a_samp > // Main include! 33. #include < zcmd > // Find it on: https://sampforum.blast.hk/showthread.php?tid=91354&highlight=zcmd 34. #include < sscanf2 > // Find it on: https://sampforum.blast.hk/showthread.ph...2.77121178 #include < foreach > 36. //======================================// 37. #define VIPS_SEND_COMMAND //Comment this if you don't want to show messages whena VIP use a command. 38. #define SHOW_LEVEL_DIALOG //Comment this if you don't want to show the dialog with your VIP level on connect. 39. //============ [ Colours ] ============// 40. #define RED 0xE60000AA 41. #define YELLOW 0xFFFF00AA 42. #define GREEN 0x00FF00AA 43. #define ABLUE 0x2641FEAA 44. #define COLOR_VIP 0xFF5500AA //aka Orange:P 45. //====================================// 46. //========== [ Dialogs ] ==========// 47. /* 48. I put the dialogids bigest to not confuse with other dialogs in your FSs/GM 49. */ 50. enum 51. { 52. MYLVL, 53. VIPS, 54. VIPCMDS, 55. ONCONN, 56. VSPA 57. }; 58. //====================================// 59. //============= [ Level Check ] ======// 60. stock 61. bool:False = false 62. ; 63. 64. #define VipCheck(%0,%1)\ 65. do{\ 66. if(P_DATA[(%0)][Vip] < (%1)){\ 67. new Str[128];\ 68. format(Str, 128, "~r~~h~ERROR!~n~~w~You need to be V.I.P level ~y~~h~%d ~w~to use this command!", (%1));\ 69. return GameTextForPlayer((%0), Str, 3000, 4);\ 70. }\ 71. }\ 72. while(False) 73. //============= [ SPEC ] =============// 74. #define ADMIN_SPEC_TYPE_NONE (0) 75. #define ADMIN_SPEC_TYPE_PLAYER (1) 76. #define ADMIN_SPEC_TYPE_VEHICLE (2) 77. /* 78. Do not touch this! 79. */ 80. //=========== [ Shortcuts ] ==========// 81. #define Public:%0(%1) \ 82. forward%0(%1); public%0(%1) 83. //====================================// 84. //========== [ News&Enums ] ==========// 85. enum pInfo 86. { 87. Vip, 88. SpecID, 89. SpecType, 90. God, 91. CarGod, 92. p_FavSkin 93. }; 94. 95. new P_DATA[ MAX_PLAYERS ][ pInfo ]; 96. new DB:Database; 97. new Float:Position[ MAX_PLAYERS ][ 4 ]; 98. //====================================// 99. 100. //==================== [ CallBacks ] =========================================// 101. public OnFilterScriptInit( ) 102. { 103. Database = db_open( "Vips.db" ); //Name of the database! You can change it! 104. 105. db_query( Database, "CREATE TABLE IF NOT EXISTS `Vips` (`Key` INTEGER PRIMARY KEY AUTOINCREMENT, `Nume` TEXT, `VipLevel` NUMERIC, `VSkin` NUMERIC)" ); 106. return 1; 107. } 108. 109. public OnFilterScriptExit( ) 110. return db_close( Database ); 111. 112. public OnPlayerConnect( playerid ) 113. { 114. new 115. Query[ 256 ], 116. string[ 128 ], 117. DBResult:Result, 118. Field[ 30 ] 119. ; 120. 121. format( Query, sizeof( Query ), "SELECT * FROM `Vips` WHERE `Nume` = '%s'", PlayerName( playerid ) ); 122. Result = db_query( Database, Query ); 123. 124. if ( Result ) 125. { 126. if ( db_num_rows( Result ) ) 127. { 128. db_get_field_assoc( Result, "VipLevel", Field, 4 ); P_DATA[ playerid ][ Vip ] = strval( Field ); 129. db_get_field_assoc( Result, "VSkin", Field, 4 ); P_DATA[ playerid ][ p_FavSkin ] = strval( Field ); 130. 131. #if defined SHOW_LEVEL_DIALOG 132. format( string, sizeof( string ), "\t{FF5500}Your V.I.P Level:\n\n{FF5500}You have V.I.P level {00FF00}%d\n\n{E60000}Congratulations!", P_DATA[ playerid ][ Vip ] ); 133. ShowPlayerDialog( playerid, ONCONN, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", string, "Quit", "" ); 134. #endif 135. } 136. else 137. { 138. P_DATA[ playerid ][ Vip ] = 0; 139. P_DATA[ playerid ][ p_FavSkin ] = -1; 140. 141. format( Query, sizeof Query, "INSERT INTO `Vips` VALUES(NULL,'%s','0','-1')", PlayerName( playerid ) ); 142. db_query( Database, Query ); 143. 144. #if defined SHOW_LEVEL_DIALOG 145. ShowPlayerDialog( playerid, ONCONN+1, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", "{E60000}This username have V.I.P level 0", "Quit", "" ); 146. #endif 147. } 148. db_free_result( Result ); 149. } 150. return 1; 151. } 152. public OnPlayerDisconnect( playerid ) 153. { 154. new 155. sz_Query[ 128 ] 156. ; 157. format( sz_Query, sizeof sz_Query, "UPDATE `Vips` SET `VipLevel` = '%d',`VSkin` = '%d' WHERE `Nume` = '%s'", P_DATA[ playerid ][ Vip ], P_DATA[ playerid ][ p_FavSkin ], PlayerName( playerid ) ); 158. db_query( Database, sz_Query ); 159. 160. foreach(Player, i ) 161. if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) 162. AdvanceSpectate( i ); 163. 164. return 1; 165. } 166. public OnPlayerDeath( playerid, killerid, reason ) 167. { 168. foreach(Player, i ) 169. if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) 170. AdvanceSpectate( i ); 171. 172. return 1; 173. } 174. public OnPlayerInteriorChange( playerid, newinteriorid, oldinteriorid ) 175. { 176. new i = 0; 177. 178. while( i != MAX_PLAYERS ) 179. { 180. if ( IsPlayerConnected( i ) && GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid && P_DATA[ i ][ SpecType ] == ADMIN_SPEC_TYPE_PLAYER ) 181. { 182. SetPlayerInterior( i, newinteriorid ); 183. } 184. i++; 185. } 186. } 187. public OnPlayerSpawn( playerid ) 188. { 189. if ( P_DATA[ playerid ][ p_FavSkin ] != -1 ) 190. SetPlayerSkin( playerid, P_DATA[ playerid ][ p_FavSkin ] ); 191. 192. return 1; 193. } 194. public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) 195. { 196. if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) 197. { 198. if ( newkeys == KEY_JUMP ) AdvanceSpectate( playerid ); 199. else if ( newkeys == KEY_SPRINT ) ReverseSpectate( playerid ); 200. } 201. return 1; 202. } 203. public OnPlayerEnterVehicle( playerid, vehicleid ) 204. { 205. foreach(Player, i ) 206. { 207. if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) 208. { 209. TogglePlayerSpectating( i, 1 ); 210. PlayerSpectateVehicle( i, vehicleid ); 211. P_DATA[ i ][ SpecType ] = ADMIN_SPEC_TYPE_VEHICLE; 212. } 213. } 214. return 1; 215. } 216. public OnPlayerText( playerid, text[ ] ) 217. { 218. new textstr[ 128 ]; 219. 220. if ( text[ 0 ] == '!' && P_DATA[ playerid ][ Vip ] >= 1 ) 221. { 222. format( textstr, sizeof( textstr ),"V.I.P Chat: {00FF00}%s{FF5500}: %s", PlayerName( playerid ), text[ 1 ] ); 223. SendVipMessage( COLOR_VIP, textstr ); 224. return 0; 225. } 226. return 1; 227. } 228. public OnPlayerExitVehicle( playerid, vehicleid ) 229. { 230. foreach(Player, i ) 231. { 232. if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid && P_DATA[ i ][ SpecType ] == ADMIN_SPEC_TYPE_VEHICLE) 233. { 234. TogglePlayerSpectating( i, 1 ); 235. PlayerSpectatePlayer( i, playerid ); 236. P_DATA[ i ][ SpecType ] = ADMIN_SPEC_TYPE_PLAYER; 237. } 238. } 239. return 1; 240. } 241. 242. public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) 243. { 244. switch( dialogid ) 245. { 246. case VSPA: 247. { 248. if ( !response ) 249. return 1; 250. 251. switch( listitem ) 252. { 253. case 0: 254. { 255. for ( new i = 0; i < 5; i++ ) 256. if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) 257. RemovePlayerAttachedObject( playerid, i ); 258. 259. SetPlayerAttachedObject( playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); 260. SendClientMessage( playerid, COLOR_VIP, "You have holded a {00FF00}dick!" ); 261. SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); 262. } 263. case 1: 264. { 265. for ( new i = 0; i < 5; i++ ) 266. if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) 267. RemovePlayerAttachedObject( playerid, i ); 268. 269. SetPlayerAttachedObject( playerid, 0, 1114, 1, 0.138007, 0.002714, -0.157366, 350.942352, 16.794704, 32.683506, 0.791829, 0.471535, 1.032759 ); 270. SetPlayerAttachedObject( playerid, 1, 1114, 1, 0.138007, 0.002714, 0.064523, 342.729064, 354.099456, 32.369094, 0.791829, 0.471535, 1.032759 ); 271. SendClientMessage( playerid, COLOR_VIP, "You have holded a {00FF00}iron!" ); 272. SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); 273. } 274. case 2: 275. { 276. for ( new i = 0; i < 5; i++ ) 277. if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) 278. RemovePlayerAttachedObject( playerid, i ); 279. 280. SetPlayerAttachedObject( playerid, 0, 18645, 2, 0.017478, 0.051500, 0.003912, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); 281. SetPlayerAttachedObject( playerid, 1, 18690, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); 282. SetPlayerAttachedObject( playerid, 2, 18716, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); 283. SendClientMessage( playerid, COLOR_VIP, "You have holded as {00FF00}Alien!" ); 284. SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); 285. } 286. case 3: 287. { 288. for ( new i = 0; i < 5; i++ ) 289. if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) 290. RemovePlayerAttachedObject( playerid, i ); 291. 292. SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); 293. SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); 294. SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); 295. SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); 296. SetPlayerAttachedObject( playerid, 4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000 ); 297. SendClientMessage( playerid, COLOR_VIP, "You have holded as {00FF00}Icread!" ); 298. SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); 299. } 300. case 4: 301. { 302. SetPlayerSpecialAction( playerid, 2 ); //Jetpack! 303. SendClientMessage( playerid, COLOR_VIP, "Jetpack Spawmed!" ); 304. } 305. } 306. } 307. } 308. return 1; 309. } 310. //============================================================================// 311. //================ [ Commands v1.0 ] =========================================// 312. CMD:setvip( playerid, params[ ] ) 313. { 314. if ( !IsPlayerAdmin( playerid ) ) 315. return SendClientMessage( playerid, RED, "Only RCON Administrator can use this command!" ); 316. 317. new 318. string[ 128 ], 319. giveplayerid, 320. level 321. ; 322. if ( sscanf( params, "ud", giveplayerid, level ) ) 323. return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/setvip [playerid] [level]" ); 324. 325. if ( giveplayerid == INVALID_PLAYER_ID ) 326. return SendClientMessage( playerid, RED, "Player Is Not Connected!" ); 327. 328. if ( level > 3 || level < 0 ) 329. return SendClientMessage( playerid, RED, "ERROR: Invalid level!" ); 330. 331. P_DATA[ giveplayerid ][ Vip ] = level; 332. format( string, sizeof( string ), "Administrator %s has set your V.I.P level to %d!", PlayerName( playerid ), level ); 333. SendClientMessage( giveplayerid, ABLUE, string ); 334. return 1; 335. } 336. CMD:vipgoto( playerid , params[ ] ) 337. { 338. new PID, string[ 128 ]; 339. new Float:x, Float:y, Float:z; 340. 341. VipCheck( playerid, 2 ); 342. 343. if ( sscanf( params, "u", PID ) ) 344. return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vipgoto [playerid]" ); 345. 346. if ( IsPlayerConnected( PID ) ) 347. return SendClientMessage( playerid, RED, "Player not connected or is yourself!" ); 348. 349. GetPlayerPos( PID , x , y , z ); 350. SetPlayerInterior( playerid , GetPlayerInterior( PID ) ); 351. SetPlayerVirtualWorld( playerid , GetPlayerVirtualWorld( PID ) ); 352. 353. if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) 354. { 355. SetVehiclePos( GetPlayerVehicleID( playerid ) , x+3 , y , z ); 356. LinkVehicleToInterior( GetPlayerVehicleID( playerid ), GetPlayerInterior( PID ) ); 357. SetVehicleVirtualWorld( GetPlayerVehicleID( playerid ), GetPlayerVirtualWorld( PID ) ); 358. format( string , sizeof( string ), "You have teleported to %s's location!" , PlayerName( PID ) ); 359. SendClientMessage( playerid ,COLOR_VIP ,string ); 360. format( string, sizeof( string ), "V.I.P {00FF00}%s(%d) {FF5500}has teleported to your location!", PlayerName( playerid ), P_DATA[ playerid ][ Vip ] ); 361. SendClientMessage( PID, COLOR_VIP, string ); 362. } else { 363. 364. SetPlayerPos( playerid , x+2 , y , z ); 365. format( string, sizeof( string ), "V.I.P {00FF00}%s(%d) {FF5500}has teleported to your location!", PlayerName( playerid ), P_DATA[ playerid ][ Vip ] ); 366. SendClientMessage( PID, COLOR_VIP, string ); 367. format( string , sizeof( string ), "You have teleported to %s's location!" , PlayerName( PID ) ); 368. SendClientMessage( playerid ,COLOR_VIP ,string ); 369. } 370. #if defined VIPS_SEND_COMMAND 371. SendVipsCommand( playerid, "/vipgoto" ); 372. #endif 373. return 1; 374. } 375. CMD:spawnme( playerid, params[ ] ) 376. { 377. VipCheck( playerid, 1 ); 378. 379. SpawnPlayer( playerid ); 380. SendClientMessage( playerid, COLOR_VIP, "You have been respawmed!" ); 381. #if defined VIPS_SEND_COMMAND 382. SendVipsCommand( playerid, "/spawnme" ); 383. #endif 384. return 1; 385. } 386. CMD:vips( playerid, params[ ] ) 387. { 388. new 389. V, 390. lsString[ 1024 ] 391. ; 392. 393. foreach(Player, i ) if ( P_DATA[ i ][ Vip ] > 0 ) 394. { 395. format( lsString, sizeof lsString, "{FF5500}%s\n{FF5500}V.I.P {00FF00}%s {FF5500}- Level {00FF00}%d", lsString, PlayerName( i ), P_DATA[ i ][ Vip ] ); 396. V++; 397. } 398. if ( V == 0 ) 399. format( lsString, sizeof lsString, "\n{E60000}No V.I.Ps online at the moment!" ); 400. 401. return ShowPlayerDialog( playerid, VIPS, DIALOG_STYLE_MSGBOX, "{00FF00}Online V.I.Ps:", lsString, "Quit", "" ); 402. } 403. CMD:myweather( playerid, params[ ] ) 404. { 405. new weather, string[ 128 ]; 406. 407. VipCheck( playerid, 1 ); 408. 409. if ( sscanf( params, "d", weather ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/myweather [weatherid]" ); 410. if ( ( weather < 0 ) || ( weather > 52 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 52 weather ids!" ); 411. 412. SetPlayerWeather( playerid, weather ); 413. format( string, sizeof( string ), "You have set your weather to {E60000}%d", weather ); 414. SendClientMessage( playerid, COLOR_VIP, string ); 415. #if defined VIPS_SEND_COMMAND 416. SendVipsCommand( playerid, "/myweather" ); 417. #endif 418. return 1; 419. } 420. CMD:mytime( playerid, params[ ] ) 421. { 422. new time, string[ 128 ]; 423. 424. VipCheck( playerid, 1 ); 425. 426. if ( sscanf( params, "d", time ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/mytime [time]" ); 427. if ( ( time < 0 ) || ( time > 24 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 24 hours you can set your time!" ); 428. 429. SetPlayerTime( playerid, time, 0 ); 430. format( string, sizeof( string ), "You have set your time to {E60000}%d", time ); 431. SendClientMessage( playerid, COLOR_VIP, string ); 432. #if defined VIPS_SEND_COMMAND 433. SendVipsCommand( playerid, "/mytime" ); 434. #endif 435. return 1; 436. } 437. CMD:myvw( playerid, params[ ] ) 438. /* 439. With this function you will be ablle to change your virtual world! 440. Disponible Virtual Worlds are between 0 and 100 you can change to bigest or lowest on this line: 441. if ( ( vw < 0 ) || ( vw > 100 ) ) 442. */ 443. { 444. new vw, string[ 128 ]; 445. 446. VipCheck( playerid, 1 ); 447. 448. if ( sscanf( params, "d", vw ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/myvw [virtualworld]" ); 449. if ( ( vw < 0 ) || ( vw > 100 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 100 Virtual Worlds ar disponible!" ); 450. 451. if ( vw == 0 ) 452. { 453. SetPlayerVirtualWorld( playerid, 0 ); 454. return SendClientMessage( playerid, YELLOW, "You have returned back in normal world( 0 )!" ); 455. } 456. SetPlayerVirtualWorld( playerid, vw ); 457. format( string, sizeof( string ), "You have set your Virtual World to {E60000}%d", vw ); 458. SendClientMessage( playerid, COLOR_VIP, string ); 459. #if defined VIPS_SEND_COMMAND 460. SendVipsCommand( playerid, "/myvw" ); 461. #endif 462. return 1; 463. } 464. CMD:vasay( playerid, params[ ] ) 465. { 466. new VipMessage[ 180 ]; 467. 468. VipCheck( playerid, 2 ); 469. 470. if ( sscanf( params, "s[ 120 ]", VipMessage ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vasay [text]" ); 471. 472. format( VipMessage, sizeof( VipMessage ), "V.I.P - %s {FFFF00}(lvl: %d): {00FF00}%s", PlayerName( playerid ), P_DATA[ playerid ][ Vip ], VipMessage ); 473. SendClientMessageToAll( COLOR_VIP, VipMessage ); 474. #if defined VIPS_SEND_COMMAND 475. SendVipsCommand( playerid, "/vasay" ); 476. #endif 477. return 1; 478. } 479. CMD:maxammo( playerid, params[ ] ) 480. { 481. VipCheck( playerid, 3 ); 482. 483. SendPlayerMaxAmmo( playerid ); 484. SendClientMessage( playerid, COLOR_VIP, "You have added {00FF00}Max Ammo{FF5500} to your weapons!" ); 485. #if defined VIPS_SEND_COMMAND 486. SendVipsCommand( playerid, "/MaxAmmo" ); 487. #endif 488. return 1; 489. } 490. CMD:vweapons( playerid, params[ ] ) 491. { 492. VipCheck( playerid, 2 ); 493. 494. GivePlayerWeapon( playerid ,28, 120) ; // Weapons: Micro SMG || Ammo: 120 495. GivePlayerWeapon( playerid, 31, 75 ); // Weapons: M4 || Gloante: 75 496. GivePlayerWeapon( playerid, 34, 15 ); // Weapons: Sniper Rifle || Ammo: 15 497. GivePlayerWeapon( playerid, 26, 100 ); // Weapons: Sawn-off Shotgun || Ammo: 100 498. #if defined VIPS_SEND_COMMAND 499. SendVipsCommand( playerid, "/vweapons" ); 500. #endif 501. return 1; 502. } 503. CMD:vspec( playerid, params[ ] ) 504. { 505. new 506. PID, 507. string[ 128 ] 508. ; 509. 510. VipCheck( playerid, 1 ); 511. 512. if ( sscanf( params, "u", PID ) ) 513. return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vspec [playerid]" ); 514. 515. if ( !IsPlayerConnected( PID ) ) 516. return SendClientMessage( playerid, RED, "ERROR: Player is not connected!" ); 517. 518. if ( GetPlayerState( PID ) == PLAYER_STATE_SPECTATING && P_DATA[ PID ][ SpecID ] != INVALID_PLAYER_ID ) 519. return SendClientMessage( playerid, RED, "ERROR: Player spectating someone else!" ); 520. 521. if ( GetPlayerState( PID ) == 1 && GetPlayerState( PID ) == 2 && GetPlayerState( PID ) == 3 ) 522. return SendClientMessage( playerid, RED, "ERROR: Player not spawned!" ); 523. 524. SpectatePlayer( playerid, PID ); 525. GetPlayerPos( playerid, Position[ playerid ][ 0 ], Position[ playerid ][ 1 ], Position[ playerid ][ 2 ] ); 526. GetPlayerFacingAngle( playerid, Position[ playerid ][ 3 ] ); 527. format( string, sizeof( string ), "Now you spectating %s (%d)", PlayerName( PID ), PID ); 528. SendClientMessage( playerid, COLOR_VIP, string ); 529. #if defined VIPS_SEND_COMMAND 530. SendVipsCommand( playerid, "/vspec" ); 531. #endif 532. return 1; 533. } 534. CMD:vspecoff( playerid, params[ ] ) 535. { 536. VipCheck( playerid, 1 ); 537. 538. if ( P_DATA[ playerid ][ SpecType ] == ADMIN_SPEC_TYPE_NONE ) 539. return SendClientMessage( playerid, RED, "ERROR: You are not spectating" ); 540. 541. StopSpectate( playerid ); 542. SetTimerEx("ReturnPosition", 3000, 0, "d", playerid ); 543. SendClientMessage( playerid, COLOR_VIP, "You have stop spectating" ); 544. #if defined VIPS_SEND_COMMAND 545. SendVipsCommand( playerid, "/vspecoff" ); 546. #endif 547. return 1; 548. } 549. CMD:vsaveskin( playerid, params[ ] ) 550. { 551. VipCheck( playerid, 2 ); 552. 553. new 554. SkinID, 555. string[ 128 ] 556. ; 557. if ( sscanf( params, "i", SkinID ) ) 558. return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vsaveskin [Current SkinID]" ); 559. 560. if ( SkinID != GetPlayerSkin( playerid ) ) 561. return SendClientMessage( playerid, RED, "ERROR: Skin enterd don't match with your current skin!" ); 562. 563. if ( SkinID < 0 || SkinID > 300 ) 564. return SendClientMessage( playerid, RED, "ERROR: Invalid skin! Only between 0 and 300 !" ); 565. 566. format( string, sizeof( string ), "You have successfully saved this skin (ID: %d)", SkinID ); 567. SendClientMessage( playerid, COLOR_VIP, string ); 568. SendClientMessage( playerid, COLOR_VIP, "Type /dontuseskin for don't save again this skin!" ); 569. 570. #if defined VIPS_SEND_COMMAND 571. SendVipsCommand( playerid, "/vsaveskin" ); 572. #endif 573. return 1; 574. } 575. CMD:dontuseskin( playerid, params[ ] ) 576. { 577. VipCheck( playerid, 2 ); 578. 579. P_DATA[ playerid ][ p_FavSkin ] = -1; 580. SetPlayerSkin( playerid, random( 300 ) ); 581. 582. #if defined VIPS_SEND_COMMAND 583. SendVipsCommand( playerid, "/dontuseskin" ); 584. #endif 585. SendClientMessage( playerid, COLOR_VIP, "Your saved skin is never been used!" ); 586. return 1; 587. } 588. CMD:mycolor( playerid, params[ ] ) 589. { 590. VipCheck( playerid, 1 ); 591. 592. new Colour, colour[ 7 ]; 593. if ( sscanf( params, "d", Colour ) ) 594. return SendClientMessage( playerid, RED, "ERROR: {FFFF00}/mycolor [color]" ), SendClientMessage( playerid, RED, "0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" ); 595. 596. if ( Colour > 8 ) 597. return SendClientMessage( playerid, RED, "Colours: 0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" ); 598. 599. switch ( Colour ) 600. { 601. case 0: SetPlayerColor( playerid, 0x000000AA ), colour = "Black"; 602. case 1: SetPlayerColor( playerid, 0xFFFFFFAA ), colour = "White"; 603. case 2: SetPlayerColor( playerid, 0xE60000AA ), colour = "Red"; 604. case 3: SetPlayerColor( playerid, 0xFF5500AA ), colour = "Orange"; 605. case 4: SetPlayerColor( playerid, 0xFFFF00AA ), colour = "Yellow"; 606. case 5: SetPlayerColor( playerid, 0x00FF00AA ), colour = "Green"; 607. case 6: SetPlayerColor( playerid, 0x0000BBAA ), colour = "Blue"; 608. case 7: SetPlayerColor( playerid, 0x800080AA ), colour = "Purple"; 609. case 8: SetPlayerColor( playerid, 0xA52A2AAA ), colour = "Brown"; 610. } 611. 612. #if defined VIPS_SEND_COMMAND 613. SendVipsCommand( playerid, "/mycolor" ); 614. #endif 615. return 1; 616. } 617. CMD:vcmds( playerid, params[ ] ) 618. { 619. VipCheck( playerid, 1 ); 620. 621. new string[ 1024 ]; 622. strcat( string, "{FF5500}V.I.P Level {00FF00}1 {FF5500}Commands:\t{FF5500}V.I.P Level {00FF00}2 {FF5500}Commands:\t{FF5500}V.I.P Level {00FF00}3 {FF5500}Commands:\n\n" ); 623. strcat( string, "{FFFF00}/mytime\t\t\t/vsaveskin\t\t\t/vkick\n" ); 624. strcat( string, "/myweather\t\t\t/dontuseskin\t\t\t/vget\n" ); 625. strcat( string, "/myvw\t\t\t\t/vweapons\t\t\t/rw\n" ); 626. strcat( string, "/mycolor\t\t\t/vipgoto\t\t\t/maxammo\n" ); 627. strcat( string, "/vspec\t\t\t\t/vasay\t\t\t\t\n" ); 628. strcat( string, "/vspecoff\n/spawnme\n/vcmds\n" ); 629. strcat( string, "{E60000}/ltc[1-13]\t\t\t/vipgod\t\t\t/vannounce\n" ); 630. strcat( string, "{E60000}/godcar\n/vcar\n/vspa\n/stophold\n/viphouse\n" ); 631. strcat( string, "\t\t\t\t{FFFF00}+V.I.P level 1 CMDS\t\t+ V.I.P level 1&2 CMDS\n\n\n" ); 632. strcat( string, "{FF5500}Use simbol {00FF00}! {FF5500}in front of your text to speak in V.I.P Chat\n" ); 633. ShowPlayerDialog( playerid, VIPCMDS, DIALOG_STYLE_MSGBOX, "V.I.P Commands:", string, "Quit", "" ); 634. return 1; 635. } 636. CMD:vget( playerid, params[ ] ) 637. { 638. new PID, string[ 256 ]; 639. new Float:x, Float:y, Float:z; 640. 641. VipCheck( playerid, 3 ); 642. 643. if ( sscanf( params, "u", PID ) ) 644. return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vget [playerid]" ); 645. 646. if ( !IsPlayerConnected( PID ) ) 647. return SendClientMessage( playerid, RED, "Player is not connected or is yourself!" ); 648. 649. GetPlayerPos( playerid, x, y, z ); 650. SetPlayerInterior( PID, GetPlayerInterior( playerid ) ); 651. SetPlayerVirtualWorld( PID, GetPlayerVirtualWorld( playerid ) ); 652. if ( GetPlayerState( PID ) == 2 ) 653. { 654. new VehicleID = GetPlayerVehicleID( PID ); 655. SetVehiclePos( VehicleID, x+3, y, z); 656. LinkVehicleToInterior( VehicleID, GetPlayerInterior( PID ) ); 657. SetVehicleVirtualWorld( GetPlayerVehicleID( PID ), GetPlayerVirtualWorld( PID ) ); 658. format( string, sizeof( string ),"You have been teleported to V.I.P {00FF00}%s's {FF5500}location", PlayerName( playerid ) ); 659. SendClientMessage( PID, COLOR_VIP, string ); 660. format( string, sizeof( string ),"You have teleported {00FF00}%s {FF5500}to your location", PlayerName( PID ) ); 661. SendClientMessage( playerid, COLOR_VIP, string ); 662. #if defined VIPS_SEND_COMMAND 663. SendVipsCommand( playerid, "/vget" ); 664. #endif 665. } else { 666. SetPlayerPos( PID, x+2, y, z ); 667. #if defined VIPS_SEND_COMMAND 668. SendVipsCommand( playerid, "/vget" ); 669. #endif 670. format( string, sizeof( string ),"You have been teleported to V.I.P {00FF00}%s's {FF5500}location", PlayerName( playerid ) ); 671. SendClientMessage( PID, COLOR_VIP, string ); 672. format( string, sizeof( string ),"You have teleported {00FF00}%s {FF5500}to your location", PlayerName( PID ) ); 673. SendClientMessage( playerid, COLOR_VIP, string ); 674. } 675. return 1; 676. } 677. CMD:vkick( playerid, params[ ] ) 678. { 679. new string[ 128 ]; 680. 681. VipCheck( playerid, 3 ); 682. 683. if ( sscanf( params, "us[ 128 ]", params[ 0 ], params[ 1 ] ) ) 684. return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vkick [playerid] [reason]" ); 685. 686. if ( IsPlayerConnected( params[ 0 ] ) ) 687. return SendClientMessage( playerid, RED, "Player is not connected !" ); 688. 689. if ( !strlen( params[ 1 ] ) ) 690. { 691. format( string, sizeof( string ), "%s {FF5500}has been kicked by V.I.P {00FF00}%s {FF5500}[no reason given]!",PlayerName( params[ 0 ] ), PlayerName( playerid ) ); 692. SendClientMessageToAll( GREEN, string ); 693. Kick( params[ 0 ] ); 694. } 695. else 696. { 697. format( string, sizeof( string ), "%s {FF5500}has been kicked by V.I.P {00FF00}%s {FF5500}[reason: {00FF00%s{FF5500}] ", PlayerName( params[ 0 ] ), PlayerName( playerid ), params[ 1 ] ); 698. SendClientMessageToAll( GREEN, string ); 699. Kick( params[ 0 ] ); 700. } 701. 702. #if defined VIPS_SEND_COMMAND 703. SendVipsCommand( playerid, "/vkick" ); 704. #endif 705. return 1; 706. } 707. CMD:rw( playerid, params[ ] ) 708. { 709. VipCheck( playerid, 3 ); 710. 711. GivePlayerWeapon( playerid, 4, 1); //Knife 712. GivePlayerWeapon( playerid, 28, 1000); // Micro - SMG 713. GivePlayerWeapon( playerid, 26, 100); // Sawn-off Shotgun 714. GivePlayerWeapon( playerid, 22, 500); // 9mm Pistol 715. //Source: https://sampwiki.blast.hk/wiki/Weapons ! 716. SendClientMessage( playerid, COLOR_VIP, "You got an Runing Weapons package!" ); 717. 718. #if defined VIPS_SEND_COMMAND 719. SendVipsCommand( playerid, "/vkick" ); 720. #endif 721. return 1; 722. } 723. CMD:vipgod( playerid, params[ ] ) 724. { 725. VipCheck( playerid, 2 ); 726. 727. switch( P_DATA[ playerid ][ God ] ) 728. { 729. case 0: 730. { 731. P_DATA[ playerid ][ God ] = 1; 732. SendClientMessage( playerid, COLOR_VIP, "You have activated the V.I.P {00FF00}God Mode!" ); 733. } 734. case 1: P_DATA[ playerid ][ God ] = 0; 735. } 736. 737. #if defined VIPS_SEND_COMMAND 738. SendVipsCommand( playerid, "/vipgod" ); 739. #endif 740. return 1; 741. } 742. CMD:godcar( playerid, params[ ] ) 743. { 744. VipCheck( playerid, 1 ); 745. 746. switch( P_DATA[ playerid ][ CarGod ] ) 747. { 748. case 0: 749. { 750. P_DATA[ playerid ][ CarGod ] = 1; 751. SendClientMessage( playerid, COLOR_VIP, "You have activated the Vehicle {00FF00}God Mode!" ); 752. } 753. case 1: P_DATA[ playerid ][ CarGod ] = 0; 754. } 755. 756. #if defined VIPS_SEND_COMMAND 757. SendVipsCommand( playerid, "/GodCar" ); 758. #endif 759. return 1; 760. } 761. CMD:ltc1( playerid, params[ ] ) 762. { 763. new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; 764. 765. VipCheck( playerid, 1 ); 766. 767. if ( IsPlayerInAnyVehicle( playerid ) ) 768. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 769. 770. #if defined VIPS_SEND_COMMAND 771. SendVipsCommand( playerid, "/ltc1" ); 772. #endif 773. GetPlayerPos( playerid, x, y, z); 774. GetPlayerFacingAngle( playerid, Angle ); 775. VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); 776. PutPlayerInVehicle( playerid, VehiclulRt, 0); 777. AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent(VehiclulRt, 1140); AddVehicleComponent(VehiclulRt, 1170); 778. AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent(VehiclulRt, 1140); AddVehicleComponent(VehiclulRt, 1170); 779. AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); 780. PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); 781. ChangeVehiclePaintjob( VehiclulRt, 0 ); 782. SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); 783. LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); 784. return 1; 785. } 786. CMD:ltc2( playerid, params[ ] ) 787. { 788. new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; 789. 790. VipCheck( playerid, 1 ); 791. 792. if ( IsPlayerInAnyVehicle( playerid ) ) 793. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 794. 795. #if defined VIPS_SEND_COMMAND 796. SendVipsCommand( playerid, "/ltc2" ); 797. #endif 798. GetPlayerPos( playerid, x, y, z ); 799. GetPlayerFacingAngle( playerid, Angle ); 800. VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); 801. PutPlayerInVehicle( playerid, VehiclulRt, 0 ); 802. AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1170 ); 803. AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1170 ); 804. AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); 805. PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); 806. ChangeVehiclePaintjob( VehiclulRt, 1 ); 807. SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); 808. LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); 809. return 1; 810. } 811. 812. CMD:ltc3( playerid, params[ ] ) 813. { 814. new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; 815. 816. VipCheck( playerid, 1 ); 817. 818. if ( IsPlayerInAnyVehicle( playerid ) ) 819. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 820. 821. #if defined VIPS_SEND_COMMAND 822. SendVipsCommand( playerid, "/ltc3" ); 823. #endif 824. GetPlayerPos( playerid, x, y, z ); 825. GetPlayerFacingAngle( playerid, Angle ); 826. VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); 827. PutPlayerInVehicle( playerid, VehiclulRt, 0 ); 828. AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1170 ); 829. AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1140 ); 830. AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); 831. PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); 832. ChangeVehiclePaintjob( VehiclulRt, 2 ); 833. SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); 834. LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); 835. return 1; 836. } 837. 838. CMD:ltc4( playerid, params[ ] ) 839. { 840. new Float:x, Float:y, Float:z, Float:Angle, carid; 841. 842. VipCheck( playerid, 1 ); 843. 844. if ( IsPlayerInAnyVehicle( playerid ) ) 845. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 846. 847. #if defined VIPS_SEND_COMMAND 848. SendVipsCommand( playerid, "/ltc4" ); 849. #endif 850. GetPlayerPos( playerid, x, y, z ); 851. GetPlayerFacingAngle( playerid, Angle ); 852. carid = CreateVehicle( 559, x, y, z, Angle, 1, -1, -1 ); 853. PutPlayerInVehicle( playerid, carid, 0 ); 854. AddVehicleComponent( carid, 1065 ); AddVehicleComponent( carid, 1067 ); AddVehicleComponent( carid, 1073 ); 855. AddVehicleComponent( carid, 1162 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); 856. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 857. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 858. return 1; 859. } 860. 861. CMD:ltc5( playerid, params[ ] ) 862. { 863. new Float:x, Float:y, Float:z, Float:Angle, carid; 864. 865. VipCheck( playerid, 1 ); 866. 867. if ( IsPlayerInAnyVehicle( playerid ) ) 868. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 869. 870. #if defined VIPS_SEND_COMMAND 871. SendVipsCommand( playerid, "/ltc5" ); 872. #endif 873. GetPlayerPos( playerid, x, y, z ); 874. GetPlayerFacingAngle( playerid, Angle ); 875. carid = CreateVehicle( 565, x, y, z, Angle, 1, -1, -1 ); 876. PutPlayerInVehicle( playerid, carid, 0 ); 877. AddVehicleComponent( carid, 1046 ); AddVehicleComponent( carid, 1049 ); AddVehicleComponent( carid, 1073 ); 878. AddVehicleComponent( carid, 1053 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); 879. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 880. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 881. return 1; 882. } 883. 884. CMD:ltc6( playerid, params[ ] ) 885. { 886. new Float:x, Float:y, Float:z, Float:Angle, carid; 887. 888. VipCheck( playerid, 1 ); 889. 890. if ( IsPlayerInAnyVehicle( playerid ) ) 891. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 892. 893. #if defined VIPS_SEND_COMMAND 894. SendVipsCommand( playerid, "/ltc6" ); 895. #endif 896. GetPlayerPos( playerid, x, y, z ); 897. GetPlayerFacingAngle( playerid, Angle ); 898. carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 ); 899. PutPlayerInVehicle( playerid, carid, 0 ); 900. AddVehicleComponent( carid, 1088 ); AddVehicleComponent( carid, 1092 ); AddVehicleComponent( carid, 1073 ); 901. AddVehicleComponent( carid, 1139 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); 902. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 903. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 904. return 1; 905. } 906. 907. CMD:ltc7( playerid, params[ ] ) 908. { 909. new Float:x, Float:y, Float:z, Float:Angle, carid; 910. 911. VipCheck( playerid, 1 ); 912. 913. if ( IsPlayerInAnyVehicle( playerid ) ) 914. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 915. 916. #if defined VIPS_SEND_COMMAND 917. SendVipsCommand( playerid, "/ltc7" ); 918. #endif 919. GetPlayerPos( playerid, x, y, z ); 920. GetPlayerFacingAngle( playerid, Angle ); 921. carid = CreateVehicle( 561, x, y, z, Angle, 1, -1, -1 ); 922. PutPlayerInVehicle( playerid, carid, 0 ); 923. AddVehicleComponent( carid, 1055 ); AddVehicleComponent( carid, 1058 ); AddVehicleComponent( carid, 1073 ); 924. AddVehicleComponent( carid, 1064 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); 925. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 926. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 927. return 1; 928. } 929. 930. CMD:ltc8( playerid, params[ ] ) 931. { 932. new Float:x, Float:y, Float:z, Float:Angle, carid; 933. 934. VipCheck( playerid, 1 ); 935. 936. if ( IsPlayerInAnyVehicle( playerid ) ) 937. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 938. 939. #if defined VIPS_SEND_COMMAND 940. SendVipsCommand( playerid, "/ltc8" ); 941. #endif 942. GetPlayerPos( playerid, x, y, z ); 943. GetPlayerFacingAngle( playerid, Angle ); 944. carid = CreateVehicle( 562, x, y, z, Angle, 1, -1, -1 ); 945. PutPlayerInVehicle( playerid, carid, 0 ); 946. AddVehicleComponent( carid, 1034 ); AddVehicleComponent( carid, 1038 ); AddVehicleComponent( carid, 1073 ); 947. AddVehicleComponent( carid, 1147 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); 948. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 949. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 950. return 1; 951. } 952. 953. CMD:ltc9( playerid, params[ ] ) 954. { 955. new Float:x, Float:y, Float:z, Float:Angle, carid; 956. 957. VipCheck( playerid, 1 ); 958. 959. if ( IsPlayerInAnyVehicle( playerid ) ) 960. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 961. 962. #if defined VIPS_SEND_COMMAND 963. SendVipsCommand( playerid, "/ltc9" ); 964. #endif 965. GetPlayerPos( playerid, x, y, z ); 966. GetPlayerFacingAngle( playerid, Angle ); 967. carid = CreateVehicle( 567, x, y, z, Angle, 1, -1, -1 ); 968. PutPlayerInVehicle( playerid, carid, 0 ); 969. AddVehicleComponent( carid, 1102 ); AddVehicleComponent( carid, 1129 ); AddVehicleComponent( carid, 1188 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1086 ); 970. AddVehicleComponent( carid, 1133 ); AddVehicleComponent( carid, 1186 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1085 ); ChangeVehiclePaintjob( carid, 1 ); 971. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 972. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 973. return 1; 974. } 975. 976. CMD:ltc10( playerid, params[ ] ) 977. { 978. new Float:x, Float:y, Float:z, Float:Angle, carid; 979. 980. VipCheck( playerid, 1 ); 981. 982. if ( IsPlayerInAnyVehicle( playerid ) ) 983. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 984. 985. #if defined VIPS_SEND_COMMAND 986. SendVipsCommand( playerid, "/ltc10" ); 987. #endif 988. GetPlayerPos( playerid, x, y, z ); 989. GetPlayerFacingAngle( playerid, Angle ); 990. carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 ); 991. PutPlayerInVehicle( playerid, carid, 0 ); 992. AddVehicleComponent( carid, 1092 ); AddVehicleComponent( carid, 1166 ); AddVehicleComponent( carid, 1165 ); AddVehicleComponent( carid, 1090 ); 993. AddVehicleComponent( carid, 1094 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1163 ); 994. AddVehicleComponent( carid, 1091 ); ChangeVehiclePaintjob( carid, 2 ); 995. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 996. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 997. return 1; 998. } 999. 1000. CMD:ltc11( playerid, params[ ] ) 1001. { 1002. new Float:x, Float:y, Float:z, Float:Angle, carid; 1003. 1004. VipCheck( playerid, 1 ); 1005. 1006. if ( IsPlayerInAnyVehicle( playerid ) ) 1007. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 1008. 1009. #if defined VIPS_SEND_COMMAND 1010. SendVipsCommand( playerid, "/ltc11" ); 1011. #endif 1012. GetPlayerPos( playerid, x, y, z ); 1013. GetPlayerFacingAngle( playerid, Angle ); 1014. carid = CreateVehicle( 557, x, y, z, Angle, 1, 1, -1 ); 1015. PutPlayerInVehicle( playerid, carid, 0 ); 1016. AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1081 ); 1017. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 1018. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 1019. return 1; 1020. } 1021. CMD:ltc12( playerid, params[ ] ) 1022. { 1023. new Float:x, Float:y, Float:z, Float:Angle, carid; 1024. 1025. VipCheck( playerid, 1 ); 1026. 1027. if ( IsPlayerInAnyVehicle( playerid ) ) 1028. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 1029. 1030. #if defined VIPS_SEND_COMMAND 1031. SendVipsCommand( playerid, "/ltc12" ); 1032. #endif 1033. GetPlayerPos( playerid, x, y, z ); 1034. GetPlayerFacingAngle( playerid, Angle ); 1035. carid = CreateVehicle( 535, x, y, z, Angle, 1, -1, -1 ); 1036. PutPlayerInVehicle( playerid, carid, 0 ); 1037. ChangeVehiclePaintjob( carid, 1 ); AddVehicleComponent( carid, 1109 ); AddVehicleComponent( carid, 1115 ); AddVehicleComponent( carid, 1117 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1010 ); 1038. AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1114 ); AddVehicleComponent( carid, 1081 ); AddVehicleComponent( carid, 1119 ); AddVehicleComponent( carid, 1121 ); 1039. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 1040. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 1041. return 1; 1042. } 1043. CMD:ltc13( playerid, params[ ] ) 1044. { 1045. new Float:x, Float:y, Float:z, Float:Angle, carid; 1046. 1047. VipCheck( playerid, 1 ); 1048. 1049. if ( IsPlayerInAnyVehicle( playerid ) ) 1050. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 1051. 1052. #if defined VIPS_SEND_COMMAND 1053. SendVipsCommand( playerid, "/ltc13" ); 1054. #endif 1055. GetPlayerPos( playerid, x, y, z ); 1056. GetPlayerFacingAngle( playerid, Angle ); 1057. carid = CreateVehicle( 562, x, y, z, Angle, 1, -1, -1 ); 1058. PutPlayerInVehicle( playerid, carid, 0 ); 1059. AddVehicleComponent( carid, 1034 ); AddVehicleComponent( carid, 1038 ); AddVehicleComponent( carid, 1147 ); 1060. AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1073 ); ChangeVehiclePaintjob( carid, 0 ); 1061. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 1062. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 1063. return 1; 1064. } 1065. CMD:vcar( playerid, params[ ] ) 1066. { 1067. new Float:x, Float:y, Float:z, Float:Angle, carid; 1068. VipCheck( playerid, 1 ); 1069. 1070. if ( IsPlayerInAnyVehicle( playerid ) ) 1071. return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); 1072. 1073. #if defined VIPS_SEND_COMMAND 1074. SendVipsCommand( playerid, "/vcar" ); 1075. #endif 1076. GetPlayerPos( playerid, x, y, z ); 1077. GetPlayerFacingAngle( playerid, Angle ); 1078. carid = CreateVehicle( 402, x, y, z, Angle, 0, 0, 0 ); // Car: Buffalo 1079. PutPlayerInVehicle( playerid, carid, 0 ); 1080. SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); 1081. LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); 1082. 1083. //Source: https://sampwiki.blast.hk/wiki/Vehicles:...2.77121178 return 1; 1085. } 1086. CMD:vannounce( playerid, params[ ] ) 1087. { 1088. VipCheck( playerid, 1 ); 1089. 1090. if ( sscanf( params, "s[128]", params[ 0 ] ) ) 1091. return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vannounce [playerid]" ); 1092. 1093. GameTextForAll( params[ 0 ], 6000, 1 ); 1094. #if defined VIPS_SEND_COMMAND 1095. SendVipsCommand( playerid, "/vannounce" ); 1096. #endif 1097. return 1; 1098. } 1099. CMD:vspa( playerid, params[ ] )// V.I.Ps Special Actions( Holds + Jetpack! ) 1100. { 1101. VipCheck( playerid, 1 ); 1102. 1103. ShowPlayerDialog( playerid, VSPA, DIALOG_STYLE_LIST, "V.I.P Special Actions!", "Hold: Dick!\nHold: Iron!\nHold: Alien!\nHold: Incred!\nSpawn: JetPack!", "Select", "Cancel" ); 1104. 1105. #if defined VIPS_SEND_COMMAND 1106. SendVipsCommand( playerid, "/vspa" ); 1107. #endif 1108. return 1; 1109. } 1110. 1111. CMD:stophold( playerid, params[ ] ) 1112. { 1113. VipCheck( playerid, 1 ); 1114. 1115. if( !IsPlayerAttachedObjectSlotUsed( playerid, 0 ) && 1116. !IsPlayerAttachedObjectSlotUsed( playerid, 1 ) && 1117. !IsPlayerAttachedObjectSlotUsed( playerid, 2 ) && 1118. !IsPlayerAttachedObjectSlotUsed( playerid, 3 ) && 1119. !IsPlayerAttachedObjectSlotUsed( playerid, 4 ) ) 1120. return SendClientMessage( playerid, RED, "You are not holding any object" ); 1121. 1122. #if defined VIPS_SEND_COMMAND 1123. SendVipsCommand( playerid, "/stophold" ); 1124. #endif 1125. 1126. for ( new i = 0; i < 5; i ++ ) 1127. { 1128. if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) 1129. { 1130. RemovePlayerAttachedObject( playerid, i ); 1131. SendClientMessage( i, RED, "You have stopped holding object!" ); 1132. } 1133. } 1134. return 1; 1135. } 1136. 1137. CMD:viphouse( playerid, params[ ] ) 1138. { 1139. VipCheck( playerid, 1 ); 1140. 1141. SetPlayerPos( playerid, -2637.69,1404.24,906.46 ); 1142. SetPlayerInterior( playerid, 3 ); 1143. RemovePlayerFromVehicle( playerid ); 1144. #if defined VIPS_SEND_COMMAND 1145. SendVipsCommand( playerid, "/VipHouse" ); 1146. #endif 1147. SendClientMessage( playerid, COLOR_VIP, "You have teleported to V.I.P House( Club )!" ); 1148. return 1; 1149. } 1150. Public: SendVipMessage( color, const string[ ] ) 1151. { 1152. foreach(Player, i ) 1153. if ( P_DATA[ i ][ Vip ] >= 1 ) 1154. SendClientMessage( i, color, string ); 1155. 1156. return 1; 1157. } 1158. Public: ReturnPosition( playerid ) 1159. { 1160. SetPlayerPos( playerid, Position[ playerid ][ 0 ], Position[ playerid ][ 1 ], Position[ playerid ][ 2 ] ); 1161. SetPlayerFacingAngle( playerid, Position[ playerid ][ 3 ] ); 1162. } 1163. Public: GodUpdate( ) 1164. { 1165. foreach(Player, i ) 1166. { 1167. if ( P_DATA[ i ][ God ] == 1 ) 1168. SetPlayerHealth( i, 100000 ); 1169. 1170. if ( P_DATA[ i ][ CarGod ] == 1 && IsPlayerInAnyVehicle( i ) ) 1171. SetVehicleHealth( GetPlayerVehicleID( i ), 10000 ); 1172. } 1173. } 1174. //======================================================== [ Stocks ] ============================================================// 1175. stock PlayerName( i ) 1176. { 1177. new n[ 24 ]; 1178. GetPlayerName( i, n, 24 ); 1179. return n; 1180. } 1181. stock SpectatePlayer( playerid, PID ) 1182. { 1183. new string[ 100 ], Float:health, Float:armour; 1184. 1185. foreach(Player, i ) 1186. if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) 1187. AdvanceSpectate( i ); 1188. 1189. SetPlayerInterior( playerid, GetPlayerInterior( PID ) ); 1190. TogglePlayerSpectating( playerid, 1 ); 1191. 1192. if ( IsPlayerInAnyVehicle( PID ) ) 1193. { 1194. PlayerSpectateVehicle( playerid, GetPlayerVehicleID( PID ) ); 1195. P_DATA[ playerid ][ SpecID ] = PID; 1196. P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_VEHICLE; 1197. } 1198. else 1199. { 1200. PlayerSpectatePlayer( playerid, PID ); 1201. P_DATA[ playerid ][ SpecID ] = PID; 1202. P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_PLAYER; 1203. } 1204. 1205. GetPlayerName( PID, string, sizeof( string ) ); 1206. GetPlayerHealth( PID, health ); 1207. GetPlayerArmour( PID, armour ); 1208. format( string, sizeof( string ),"~n~~n~~n~~n~~n~~n~~n~n~~w~%s - id:%d~n~< sprint - jump >~n~~r~Health:%0.1f ~b~Armour:%0.1f~n~~g~$%d~n~~g~%d", string, PID, health, armour, GetPlayerMoney( PID ), GetPlayerScore( PID ) ); 1209. GameTextForPlayer( playerid, string, 25000, 3 ); 1210. return 1; 1211. } 1212. stock StopSpectate( playerid ) 1213. { 1214. TogglePlayerSpectating( playerid, 0 ); 1215. P_DATA[ playerid ][ SpecID ] = INVALID_PLAYER_ID; 1216. P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_NONE; 1217. GameTextForPlayer( playerid,"~n~~n~~n~~w~Spectate mode ended", 1000, 3 ); 1218. return 1; 1219. } 1220. stock AdvanceSpectate( playerid ) 1221. { 1222. if ( ConnectedPlayers( ) == 2 ) 1223. return StopSpectate( playerid ); 1224. 1225. if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) 1226. { 1227. for ( new i = P_DATA[ playerid ][ SpecID] +1; i <= MAX_PLAYERS; i++ ) 1228. { 1229. if ( i == MAX_PLAYERS ) i = 0; 1230. if ( IsPlayerConnected( i ) && i != playerid ) 1231. { 1232. if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] != INVALID_PLAYER_ID || ( GetPlayerState( i ) != 1 && GetPlayerState( i ) != 2 && GetPlayerState( i ) != 3 ) ) 1233. { 1234. continue; 1235. } else { 1236. SpectatePlayer( playerid, i ); 1237. break; 1238. } 1239. } 1240. } 1241. } 1242. return 1; 1243. } 1244. stock ConnectedPlayers( ) 1245. { 1246. new Connected; 1247. foreach(Player, i ) Connected++; 1248. return Connected; 1249. } 1250. #if defined VIPS_SEND_COMMAND 1251. stock SendVipsCommand( playerid, cmdtext[ ] ) 1252. { 1253. new str[ 128 ]; 1254. 1255. format( str, sizeof( str ),"[V.I.P] {00FF00}%s(%d) {FF5500}has used command {00FF00}%s", PlayerName( playerid ), playerid, cmdtext ); 1256. return SendVipMessage( COLOR_VIP, str ); 1257. } 1258. #endif 1259. stock ReverseSpectate( playerid ) 1260. { 1261. if ( ConnectedPlayers( ) == 2 ) 1262. { 1263. StopSpectate( playerid ); 1264. return 1; 1265. } 1266. if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) 1267. { 1268. for ( new i = P_DATA[ playerid ][ SpecID ]-1; i >= 0; i-- ) 1269. { 1270. if ( i == 0 ) i = MAX_PLAYERS; 1271. if ( IsPlayerConnected( i ) && i != playerid ) 1272. { 1273. if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] != INVALID_PLAYER_ID || ( GetPlayerState( i ) != 1 && GetPlayerState( i ) != 2 && GetPlayerState( i ) != 3 ) ) 1274. { 1275. continue; 1276. } else { 1277. SpectatePlayer( playerid, i ); 1278. break; 1279. } 1280. } 1281. } 1282. } 1283. return 1; 1284. } 1285. stock SendPlayerMaxAmmo( playerid ) 1286. { 1287. new slot, weap, ammo; 1288. 1289. for ( slot = 0; slot < 14; slot++ ) 1290. { 1291. GetPlayerWeaponData( playerid, slot, weap, ammo ); 1292. if ( IsValidWeapon( weap ) ) 1293. { 1294. GivePlayerWeapon( playerid, weap, 99999 ); 1295. } 1296. } 1297. return 1; 1298. } 1299. stock IsValidWeapon( weaponid ) 1300. { 1301. if ( weaponid > 0 && weaponid < 19 || weaponid > 21 && weaponid < 47 ) return 1; 1302. return 0; 1303. } 1304. //============================================================ [ EOF ] ===========================================================// create a new version of this paste RAW Paste Data #if defined VIP xxSPEEDYxx's V.I.P System - NEW* 3 Levels v2.0 COMMANDS - [v1.0]: V.I.P Level 1 Commands: V.I.P Level 2 Commands: V.I.P Level 3 Commands: /mytime /vsaveskin /vkick /myweather /dontuseskin /vget /myvw /vweapons /rw /mycolor /vipgoto /maxammo /vspec /vasay + V.I.P level 1&2 CMDS /vspecoff + V.I.P level 1 CMDS /spawnme /vcmds COMMANDS - [v2.0]: V.I.P Level 1 Commands: V.I.P Level 2 Commands: V.I.P Level 3 Commands: /ltc[1 - 13] /vipgod /vannounce /viphouse /godcar /vcar /vspa( V.I.P Special Actions! ) /stophold! V.I.P over 35 command! OMG! #endif //============ [ Includes ] ============// #include < a_samp > // Main include! #include < zcmd > // Find it on: https://sampforum.blast.hk/showthread.php?tid=91354&highlight=zcmd #include < sscanf2 > // Find it on: https://sampforum.blast.hk/showthread.ph...2.77121178 #include < foreach > //======================================// #define VIPS_SEND_COMMAND //Comment this if you don't want to show messages whena VIP use a command. #define SHOW_LEVEL_DIALOG //Comment this if you don't want to show the dialog with your VIP level on connect. //============ [ Colours ] ============// #define RED 0xE60000AA #define YELLOW 0xFFFF00AA #define GREEN 0x00FF00AA #define ABLUE 0x2641FEAA #define COLOR_VIP 0xFF5500AA //aka Orange:P //====================================// //========== [ Dialogs ] ==========// /* I put the dialogids bigest to not confuse with other dialogs in your FSs/GM */ enum { MYLVL, VIPS, VIPCMDS, ONCONN, VSPA }; //====================================// //============= [ Level Check ] ======// stock bool:False = false ; #define VipCheck(%0,%1)\ do{\ if(P_DATA[(%0)][Vip] < (%1)){\ new Str[128];\ format(Str, 128, "~r~~h~ERROR!~n~~w~You need to be V.I.P level ~y~~h~%d ~w~to use this command!", (%1));\ return GameTextForPlayer((%0), Str, 3000, 4);\ }\ }\ while(False) //============= [ SPEC ] =============// #define ADMIN_SPEC_TYPE_NONE (0) #define ADMIN_SPEC_TYPE_PLAYER (1) #define ADMIN_SPEC_TYPE_VEHICLE (2) /* Do not touch this! */ //=========== [ Shortcuts ] ==========// #define Public:%0(%1) \ forward%0(%1); public%0(%1) //====================================// //========== [ News&Enums ] ==========// enum pInfo { Vip, SpecID, SpecType, God, CarGod, p_FavSkin }; new P_DATA[ MAX_PLAYERS ][ pInfo ]; new DB:Database; new Float:Position[ MAX_PLAYERS ][ 4 ]; //====================================// //==================== [ CallBacks ] =========================================// public OnFilterScriptInit( ) { Database = db_open( "Vips.db" ); //Name of the database! You can change it! db_query( Database, "CREATE TABLE IF NOT EXISTS `Vips` (`Key` INTEGER PRIMARY KEY AUTOINCREMENT, `Nume` TEXT, `VipLevel` NUMERIC, `VSkin` NUMERIC)" ); return 1; } public OnFilterScriptExit( ) return db_close( Database ); public OnPlayerConnect( playerid ) { new Query[ 256 ], string[ 128 ], DBResult:Result, Field[ 30 ] ; format( Query, sizeof( Query ), "SELECT * FROM `Vips` WHERE `Nume` = '%s'", PlayerName( playerid ) ); Result = db_query( Database, Query ); if ( Result ) { if ( db_num_rows( Result ) ) { db_get_field_assoc( Result, "VipLevel", Field, 4 ); P_DATA[ playerid ][ Vip ] = strval( Field ); db_get_field_assoc( Result, "VSkin", Field, 4 ); P_DATA[ playerid ][ p_FavSkin ] = strval( Field ); #if defined SHOW_LEVEL_DIALOG format( string, sizeof( string ), "\t{FF5500}Your V.I.P Level:\n\n{FF5500}You have V.I.P level {00FF00}%d\n\n{E60000}Congratulations!", P_DATA[ playerid ][ Vip ] ); ShowPlayerDialog( playerid, ONCONN, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", string, "Quit", "" ); #endif } else { P_DATA[ playerid ][ Vip ] = 0; P_DATA[ playerid ][ p_FavSkin ] = -1; format( Query, sizeof Query, "INSERT INTO `Vips` VALUES(NULL,'%s','0','-1')", PlayerName( playerid ) ); db_query( Database, Query ); #if defined SHOW_LEVEL_DIALOG ShowPlayerDialog( playerid, ONCONN+1, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", "{E60000}This username have V.I.P level 0", "Quit", "" ); #endif } db_free_result( Result ); } return 1; } public OnPlayerDisconnect( playerid ) { new sz_Query[ 128 ] ; format( sz_Query, sizeof sz_Query, "UPDATE `Vips` SET `VipLevel` = '%d',`VSkin` = '%d' WHERE `Nume` = '%s'", P_DATA[ playerid ][ Vip ], P_DATA[ playerid ][ p_FavSkin ], PlayerName( playerid ) ); db_query( Database, sz_Query ); foreach(Player, i ) if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) AdvanceSpectate( i ); return 1; } public OnPlayerDeath( playerid, killerid, reason ) { foreach(Player, i ) if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) AdvanceSpectate( i ); return 1; } public OnPlayerInteriorChange( playerid, newinteriorid, oldinteriorid ) { new i = 0; while( i != MAX_PLAYERS ) { if ( IsPlayerConnected( i ) && GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid && P_DATA[ i ][ SpecType ] == ADMIN_SPEC_TYPE_PLAYER ) { SetPlayerInterior( i, newinteriorid ); } i++; } } public OnPlayerSpawn( playerid ) { if ( P_DATA[ playerid ][ p_FavSkin ] != -1 ) SetPlayerSkin( playerid, P_DATA[ playerid ][ p_FavSkin ] ); return 1; } public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) { if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) { if ( newkeys == KEY_JUMP ) AdvanceSpectate( playerid ); else if ( newkeys == KEY_SPRINT ) ReverseSpectate( playerid ); } return 1; } public OnPlayerEnterVehicle( playerid, vehicleid ) { foreach(Player, i ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) { TogglePlayerSpectating( i, 1 ); PlayerSpectateVehicle( i, vehicleid ); P_DATA[ i ][ SpecType ] = ADMIN_SPEC_TYPE_VEHICLE; } } return 1; } public OnPlayerText( playerid, text[ ] ) { new textstr[ 128 ]; if ( text[ 0 ] == '!' && P_DATA[ playerid ][ Vip ] >= 1 ) { format( textstr, sizeof( textstr ),"V.I.P Chat: {00FF00}%s{FF5500}: %s", PlayerName( playerid ), text[ 1 ] ); SendVipMessage( COLOR_VIP, textstr ); return 0; } return 1; } public OnPlayerExitVehicle( playerid, vehicleid ) { foreach(Player, i ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid && P_DATA[ i ][ SpecType ] == ADMIN_SPEC_TYPE_VEHICLE) { TogglePlayerSpectating( i, 1 ); PlayerSpectatePlayer( i, playerid ); P_DATA[ i ][ SpecType ] = ADMIN_SPEC_TYPE_PLAYER; } } return 1; } public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) { switch( dialogid ) { case VSPA: { if ( !response ) return 1; switch( listitem ) { case 0: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); SendClientMessage( playerid, COLOR_VIP, "You have holded a {00FF00}dick!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 1: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 0, 1114, 1, 0.138007, 0.002714, -0.157366, 350.942352, 16.794704, 32.683506, 0.791829, 0.471535, 1.032759 ); SetPlayerAttachedObject( playerid, 1, 1114, 1, 0.138007, 0.002714, 0.064523, 342.729064, 354.099456, 32.369094, 0.791829, 0.471535, 1.032759 ); SendClientMessage( playerid, COLOR_VIP, "You have holded a {00FF00}iron!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 2: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 0, 18645, 2, 0.017478, 0.051500, 0.003912, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); SetPlayerAttachedObject( playerid, 1, 18690, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); SetPlayerAttachedObject( playerid, 2, 18716, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); SendClientMessage( playerid, COLOR_VIP, "You have holded as {00FF00}Alien!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 3: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000 ); SendClientMessage( playerid, COLOR_VIP, "You have holded as {00FF00}Icread!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 4: { SetPlayerSpecialAction( playerid, 2 ); //Jetpack! SendClientMessage( playerid, COLOR_VIP, "Jetpack Spawmed!" ); } } } } return 1; } //============================================================================// //================ [ Commands v1.0 ] =========================================// CMD:setvip( playerid, params[ ] ) { if ( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, RED, "Only RCON Administrator can use this command!" ); new string[ 128 ], giveplayerid, level ; if ( sscanf( params, "ud", giveplayerid, level ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/setvip [playerid] [level]" ); if ( giveplayerid == INVALID_PLAYER_ID ) return SendClientMessage( playerid, RED, "Player Is Not Connected!" ); if ( level > 3 || level < 0 ) return SendClientMessage( playerid, RED, "ERROR: Invalid level!" ); P_DATA[ giveplayerid ][ Vip ] = level; format( string, sizeof( string ), "Administrator %s has set your V.I.P level to %d!", PlayerName( playerid ), level ); SendClientMessage( giveplayerid, ABLUE, string ); return 1; } CMD:vipgoto( playerid , params[ ] ) { new PID, string[ 128 ]; new Float:x, Float:y, Float:z; VipCheck( playerid, 2 ); if ( sscanf( params, "u", PID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vipgoto [playerid]" ); if ( IsPlayerConnected( PID ) ) return SendClientMessage( playerid, RED, "Player not connected or is yourself!" ); GetPlayerPos( PID , x , y , z ); SetPlayerInterior( playerid , GetPlayerInterior( PID ) ); SetPlayerVirtualWorld( playerid , GetPlayerVirtualWorld( PID ) ); if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) { SetVehiclePos( GetPlayerVehicleID( playerid ) , x+3 , y , z ); LinkVehicleToInterior( GetPlayerVehicleID( playerid ), GetPlayerInterior( PID ) ); SetVehicleVirtualWorld( GetPlayerVehicleID( playerid ), GetPlayerVirtualWorld( PID ) ); format( string , sizeof( string ), "You have teleported to %s's location!" , PlayerName( PID ) ); SendClientMessage( playerid ,COLOR_VIP ,string ); format( string, sizeof( string ), "V.I.P {00FF00}%s(%d) {FF5500}has teleported to your location!", PlayerName( playerid ), P_DATA[ playerid ][ Vip ] ); SendClientMessage( PID, COLOR_VIP, string ); } else { SetPlayerPos( playerid , x+2 , y , z ); format( string, sizeof( string ), "V.I.P {00FF00}%s(%d) {FF5500}has teleported to your location!", PlayerName( playerid ), P_DATA[ playerid ][ Vip ] ); SendClientMessage( PID, COLOR_VIP, string ); format( string , sizeof( string ), "You have teleported to %s's location!" , PlayerName( PID ) ); SendClientMessage( playerid ,COLOR_VIP ,string ); } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vipgoto" ); #endif return 1; } CMD:spawnme( playerid, params[ ] ) { VipCheck( playerid, 1 ); SpawnPlayer( playerid ); SendClientMessage( playerid, COLOR_VIP, "You have been respawmed!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/spawnme" ); #endif return 1; } CMD:vips( playerid, params[ ] ) { new V, lsString[ 1024 ] ; foreach(Player, i ) if ( P_DATA[ i ][ Vip ] > 0 ) { format( lsString, sizeof lsString, "{FF5500}%s\n{FF5500}V.I.P {00FF00}%s {FF5500}- Level {00FF00}%d", lsString, PlayerName( i ), P_DATA[ i ][ Vip ] ); V++; } if ( V == 0 ) format( lsString, sizeof lsString, "\n{E60000}No V.I.Ps online at the moment!" ); return ShowPlayerDialog( playerid, VIPS, DIALOG_STYLE_MSGBOX, "{00FF00}Online V.I.Ps:", lsString, "Quit", "" ); } CMD:myweather( playerid, params[ ] ) { new weather, string[ 128 ]; VipCheck( playerid, 1 ); if ( sscanf( params, "d", weather ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/myweather [weatherid]" ); if ( ( weather < 0 ) || ( weather > 52 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 52 weather ids!" ); SetPlayerWeather( playerid, weather ); format( string, sizeof( string ), "You have set your weather to {E60000}%d", weather ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/myweather" ); #endif return 1; } CMD:mytime( playerid, params[ ] ) { new time, string[ 128 ]; VipCheck( playerid, 1 ); if ( sscanf( params, "d", time ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/mytime [time]" ); if ( ( time < 0 ) || ( time > 24 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 24 hours you can set your time!" ); SetPlayerTime( playerid, time, 0 ); format( string, sizeof( string ), "You have set your time to {E60000}%d", time ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/mytime" ); #endif return 1; } CMD:myvw( playerid, params[ ] ) /* With this function you will be ablle to change your virtual world! Disponible Virtual Worlds are between 0 and 100 you can change to bigest or lowest on this line: if ( ( vw < 0 ) || ( vw > 100 ) ) */ { new vw, string[ 128 ]; VipCheck( playerid, 1 ); if ( sscanf( params, "d", vw ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/myvw [virtualworld]" ); if ( ( vw < 0 ) || ( vw > 100 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 100 Virtual Worlds ar disponible!" ); if ( vw == 0 ) { SetPlayerVirtualWorld( playerid, 0 ); return SendClientMessage( playerid, YELLOW, "You have returned back in normal world( 0 )!" ); } SetPlayerVirtualWorld( playerid, vw ); format( string, sizeof( string ), "You have set your Virtual World to {E60000}%d", vw ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/myvw" ); #endif return 1; } CMD:vasay( playerid, params[ ] ) { new VipMessage[ 180 ]; VipCheck( playerid, 2 ); if ( sscanf( params, "s[ 120 ]", VipMessage ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vasay [text]" ); format( VipMessage, sizeof( VipMessage ), "V.I.P - %s {FFFF00}(lvl: %d): {00FF00}%s", PlayerName( playerid ), P_DATA[ playerid ][ Vip ], VipMessage ); SendClientMessageToAll( COLOR_VIP, VipMessage ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vasay" ); #endif return 1; } CMD:maxammo( playerid, params[ ] ) { VipCheck( playerid, 3 ); SendPlayerMaxAmmo( playerid ); SendClientMessage( playerid, COLOR_VIP, "You have added {00FF00}Max Ammo{FF5500} to your weapons!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/MaxAmmo" ); #endif return 1; } CMD:vweapons( playerid, params[ ] ) { VipCheck( playerid, 2 ); GivePlayerWeapon( playerid ,28, 120) ; // Weapons: Micro SMG || Ammo: 120 GivePlayerWeapon( playerid, 31, 75 ); // Weapons: M4 || Gloante: 75 GivePlayerWeapon( playerid, 34, 15 ); // Weapons: Sniper Rifle || Ammo: 15 GivePlayerWeapon( playerid, 26, 100 ); // Weapons: Sawn-off Shotgun || Ammo: 100 #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vweapons" ); #endif return 1; } CMD:vspec( playerid, params[ ] ) { new PID, string[ 128 ] ; VipCheck( playerid, 1 ); if ( sscanf( params, "u", PID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vspec [playerid]" ); if ( !IsPlayerConnected( PID ) ) return SendClientMessage( playerid, RED, "ERROR: Player is not connected!" ); if ( GetPlayerState( PID ) == PLAYER_STATE_SPECTATING && P_DATA[ PID ][ SpecID ] != INVALID_PLAYER_ID ) return SendClientMessage( playerid, RED, "ERROR: Player spectating someone else!" ); if ( GetPlayerState( PID ) == 1 && GetPlayerState( PID ) == 2 && GetPlayerState( PID ) == 3 ) return SendClientMessage( playerid, RED, "ERROR: Player not spawned!" ); SpectatePlayer( playerid, PID ); GetPlayerPos( playerid, Position[ playerid ][ 0 ], Position[ playerid ][ 1 ], Position[ playerid ][ 2 ] ); GetPlayerFacingAngle( playerid, Position[ playerid ][ 3 ] ); format( string, sizeof( string ), "Now you spectating %s (%d)", PlayerName( PID ), PID ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vspec" ); #endif return 1; } CMD:vspecoff( playerid, params[ ] ) { VipCheck( playerid, 1 ); if ( P_DATA[ playerid ][ SpecType ] == ADMIN_SPEC_TYPE_NONE ) return SendClientMessage( playerid, RED, "ERROR: You are not spectating" ); StopSpectate( playerid ); SetTimerEx("ReturnPosition", 3000, 0, "d", playerid ); SendClientMessage( playerid, COLOR_VIP, "You have stop spectating" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vspecoff" ); #endif return 1; } CMD:vsaveskin( playerid, params[ ] ) { VipCheck( playerid, 2 ); new SkinID, string[ 128 ] ; if ( sscanf( params, "i", SkinID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vsaveskin [Current SkinID]" ); if ( SkinID != GetPlayerSkin( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: Skin enterd don't match with your current skin!" ); if ( SkinID < 0 || SkinID > 300 ) return SendClientMessage( playerid, RED, "ERROR: Invalid skin! Only between 0 and 300 !" ); format( string, sizeof( string ), "You have successfully saved this skin (ID: %d)", SkinID ); SendClientMessage( playerid, COLOR_VIP, string ); SendClientMessage( playerid, COLOR_VIP, "Type /dontuseskin for don't save again this skin!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vsaveskin" ); #endif return 1; } CMD:dontuseskin( playerid, params[ ] ) { VipCheck( playerid, 2 ); P_DATA[ playerid ][ p_FavSkin ] = -1; SetPlayerSkin( playerid, random( 300 ) ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/dontuseskin" ); #endif SendClientMessage( playerid, COLOR_VIP, "Your saved skin is never been used!" ); return 1; } CMD:mycolor( playerid, params[ ] ) { VipCheck( playerid, 1 ); new Colour, colour[ 7 ]; if ( sscanf( params, "d", Colour ) ) return SendClientMessage( playerid, RED, "ERROR: {FFFF00}/mycolor [color]" ), SendClientMessage( playerid, RED, "0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" ); if ( Colour > 8 ) return SendClientMessage( playerid, RED, "Colours: 0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" ); switch ( Colour ) { case 0: SetPlayerColor( playerid, 0x000000AA ), colour = "Black"; case 1: SetPlayerColor( playerid, 0xFFFFFFAA ), colour = "White"; case 2: SetPlayerColor( playerid, 0xE60000AA ), colour = "Red"; case 3: SetPlayerColor( playerid, 0xFF5500AA ), colour = "Orange"; case 4: SetPlayerColor( playerid, 0xFFFF00AA ), colour = "Yellow"; case 5: SetPlayerColor( playerid, 0x00FF00AA ), colour = "Green"; case 6: SetPlayerColor( playerid, 0x0000BBAA ), colour = "Blue"; case 7: SetPlayerColor( playerid, 0x800080AA ), colour = "Purple"; case 8: SetPlayerColor( playerid, 0xA52A2AAA ), colour = "Brown"; } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/mycolor" ); #endif return 1; } CMD:vcmds( playerid, params[ ] ) { VipCheck( playerid, 1 ); new string[ 1024 ]; strcat( string, "{FF5500}V.I.P Level {00FF00}1 {FF5500}Commands:\t{FF5500}V.I.P Level {00FF00}2 {FF5500}Commands:\t{FF5500}V.I.P Level {00FF00}3 {FF5500}Commands:\n\n" ); strcat( string, "{FFFF00}/mytime\t\t\t/vsaveskin\t\t\t/vkick\n" ); strcat( string, "/myweather\t\t\t/dontuseskin\t\t\t/vget\n" ); strcat( string, "/myvw\t\t\t\t/vweapons\t\t\t/rw\n" ); strcat( string, "/mycolor\t\t\t/vipgoto\t\t\t/maxammo\n" ); strcat( string, "/vspec\t\t\t\t/vasay\t\t\t\t\n" ); strcat( string, "/vspecoff\n/spawnme\n/vcmds\n" ); strcat( string, "{E60000}/ltc[1-13]\t\t\t/vipgod\t\t\t/vannounce\n" ); strcat( string, "{E60000}/godcar\n/vcar\n/vspa\n/stophold\n/viphouse\n" ); strcat( string, "\t\t\t\t{FFFF00}+V.I.P level 1 CMDS\t\t+ V.I.P level 1&2 CMDS\n\n\n" ); strcat( string, "{FF5500}Use simbol {00FF00}! {FF5500}in front of your text to speak in V.I.P Chat\n" ); ShowPlayerDialog( playerid, VIPCMDS, DIALOG_STYLE_MSGBOX, "V.I.P Commands:", string, "Quit", "" ); return 1; } CMD:vget( playerid, params[ ] ) { new PID, string[ 256 ]; new Float:x, Float:y, Float:z; VipCheck( playerid, 3 ); if ( sscanf( params, "u", PID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vget [playerid]" ); if ( !IsPlayerConnected( PID ) ) return SendClientMessage( playerid, RED, "Player is not connected or is yourself!" ); GetPlayerPos( playerid, x, y, z ); SetPlayerInterior( PID, GetPlayerInterior( playerid ) ); SetPlayerVirtualWorld( PID, GetPlayerVirtualWorld( playerid ) ); if ( GetPlayerState( PID ) == 2 ) { new VehicleID = GetPlayerVehicleID( PID ); SetVehiclePos( VehicleID, x+3, y, z); LinkVehicleToInterior( VehicleID, GetPlayerInterior( PID ) ); SetVehicleVirtualWorld( GetPlayerVehicleID( PID ), GetPlayerVirtualWorld( PID ) ); format( string, sizeof( string ),"You have been teleported to V.I.P {00FF00}%s's {FF5500}location", PlayerName( playerid ) ); SendClientMessage( PID, COLOR_VIP, string ); format( string, sizeof( string ),"You have teleported {00FF00}%s {FF5500}to your location", PlayerName( PID ) ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vget" ); #endif } else { SetPlayerPos( PID, x+2, y, z ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vget" ); #endif format( string, sizeof( string ),"You have been teleported to V.I.P {00FF00}%s's {FF5500}location", PlayerName( playerid ) ); SendClientMessage( PID, COLOR_VIP, string ); format( string, sizeof( string ),"You have teleported {00FF00}%s {FF5500}to your location", PlayerName( PID ) ); SendClientMessage( playerid, COLOR_VIP, string ); } return 1; } CMD:vkick( playerid, params[ ] ) { new string[ 128 ]; VipCheck( playerid, 3 ); if ( sscanf( params, "us[ 128 ]", params[ 0 ], params[ 1 ] ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vkick [playerid] [reason]" ); if ( IsPlayerConnected( params[ 0 ] ) ) return SendClientMessage( playerid, RED, "Player is not connected !" ); if ( !strlen( params[ 1 ] ) ) { format( string, sizeof( string ), "%s {FF5500}has been kicked by V.I.P {00FF00}%s {FF5500}[no reason given]!",PlayerName( params[ 0 ] ), PlayerName( playerid ) ); SendClientMessageToAll( GREEN, string ); Kick( params[ 0 ] ); } else { format( string, sizeof( string ), "%s {FF5500}has been kicked by V.I.P {00FF00}%s {FF5500}[reason: {00FF00%s{FF5500}] ", PlayerName( params[ 0 ] ), PlayerName( playerid ), params[ 1 ] ); SendClientMessageToAll( GREEN, string ); Kick( params[ 0 ] ); } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vkick" ); #endif return 1; } CMD:rw( playerid, params[ ] ) { VipCheck( playerid, 3 ); GivePlayerWeapon( playerid, 4, 1); //Knife GivePlayerWeapon( playerid, 28, 1000); // Micro - SMG GivePlayerWeapon( playerid, 26, 100); // Sawn-off Shotgun GivePlayerWeapon( playerid, 22, 500); // 9mm Pistol //Source: https://sampwiki.blast.hk/wiki/Weapons ! SendClientMessage( playerid, COLOR_VIP, "You got an Runing Weapons package!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vkick" ); #endif return 1; } CMD:vipgod( playerid, params[ ] ) { VipCheck( playerid, 2 ); switch( P_DATA[ playerid ][ God ] ) { case 0: { P_DATA[ playerid ][ God ] = 1; SendClientMessage( playerid, COLOR_VIP, "You have activated the V.I.P {00FF00}God Mode!" ); } case 1: P_DATA[ playerid ][ God ] = 0; } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vipgod" ); #endif return 1; } CMD:godcar( playerid, params[ ] ) { VipCheck( playerid, 1 ); switch( P_DATA[ playerid ][ CarGod ] ) { case 0: { P_DATA[ playerid ][ CarGod ] = 1; SendClientMessage( playerid, COLOR_VIP, "You have activated the Vehicle {00FF00}God Mode!" ); } case 1: P_DATA[ playerid ][ CarGod ] = 0; } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/GodCar" ); #endif return 1; } CMD:ltc1( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc1" ); #endif GetPlayerPos( playerid, x, y, z); GetPlayerFacingAngle( playerid, Angle ); VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, VehiclulRt, 0); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent(VehiclulRt, 1140); AddVehicleComponent(VehiclulRt, 1170); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent(VehiclulRt, 1140); AddVehicleComponent(VehiclulRt, 1170); AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); ChangeVehiclePaintjob( VehiclulRt, 0 ); SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc2( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc2" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, VehiclulRt, 0 ); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1170 ); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1170 ); AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); ChangeVehiclePaintjob( VehiclulRt, 1 ); SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc3( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc3" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, VehiclulRt, 0 ); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1170 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); ChangeVehiclePaintjob( VehiclulRt, 2 ); SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc4( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc4" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 559, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1065 ); AddVehicleComponent( carid, 1067 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1162 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc5( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc5" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 565, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1046 ); AddVehicleComponent( carid, 1049 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1053 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc6( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc6" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1088 ); AddVehicleComponent( carid, 1092 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1139 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc7( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc7" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 561, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1055 ); AddVehicleComponent( carid, 1058 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1064 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc8( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc8" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 562, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1034 ); AddVehicleComponent( carid, 1038 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1147 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc9( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc9" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 567, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1102 ); AddVehicleComponent( carid, 1129 ); AddVehicleComponent( carid, 1188 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1086 ); AddVehicleComponent( carid, 1133 ); AddVehicleComponent( carid, 1186 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1085 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc10( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc10" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1092 ); AddVehicleComponent( carid, 1166 ); AddVehicleComponent( carid, 1165 ); AddVehicleComponent( carid, 1090 ); AddVehicleComponent( carid, 1094 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1163 ); AddVehicleComponent( carid, 1091 ); ChangeVehiclePaintjob( carid, 2 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc11( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc11" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 557, x, y, z, Angle, 1, 1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1081 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc12( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc12" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 535, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); ChangeVehiclePaintjob( carid, 1 ); AddVehicleComponent( carid, 1109 ); AddVehicleComponent( carid, 1115 ); AddVehicleComponent( carid, 1117 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1114 ); AddVehicleComponent( carid, 1081 ); AddVehicleComponent( carid, 1119 ); AddVehicleComponent( carid, 1121 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc13( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc13" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 562, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1034 ); AddVehicleComponent( carid, 1038 ); AddVehicleComponent( carid, 1147 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1073 ); ChangeVehiclePaintjob( carid, 0 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:vcar( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vcar" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 402, x, y, z, Angle, 0, 0, 0 ); // Car: Buffalo PutPlayerInVehicle( playerid, carid, 0 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); //Source: https://sampwiki.blast.hk/wiki/Vehicles:...2.77121178 return 1; } CMD:vannounce( playerid, params[ ] ) { VipCheck( playerid, 1 ); if ( sscanf( params, "s[128]", params[ 0 ] ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vannounce [playerid]" ); GameTextForAll( params[ 0 ], 6000, 1 ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vannounce" ); #endif return 1; } CMD:vspa( playerid, params[ ] )// V.I.Ps Special Actions( Holds + Jetpack! ) { VipCheck( playerid, 1 ); ShowPlayerDialog( playerid, VSPA, DIALOG_STYLE_LIST, "V.I.P Special Actions!", "Hold: Dick!\nHold: Iron!\nHold: Alien!\nHold: Incred!\nSpawn: JetPack!", "Select", "Cancel" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vspa" ); #endif return 1; } CMD:stophold( playerid, params[ ] ) { VipCheck( playerid, 1 ); if( !IsPlayerAttachedObjectSlotUsed( playerid, 0 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 1 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 2 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 3 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 4 ) ) return SendClientMessage( playerid, RED, "You are not holding any object" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/stophold" ); #endif for ( new i = 0; i < 5; i ++ ) { if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) { RemovePlayerAttachedObject( playerid, i ); SendClientMessage( i, RED, "You have stopped holding object!" ); } } return 1; } CMD:viphouse( playerid, params[ ] ) { VipCheck( playerid, 1 ); SetPlayerPos( playerid, -2637.69,1404.24,906.46 ); SetPlayerInterior( playerid, 3 ); RemovePlayerFromVehicle( playerid ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/VipHouse" ); #endif SendClientMessage( playerid, COLOR_VIP, "You have teleported to V.I.P House( Club )!" ); return 1; } Public: SendVipMessage( color, const string[ ] ) { foreach(Player, i ) if ( P_DATA[ i ][ Vip ] >= 1 ) SendClientMessage( i, color, string ); return 1; } Public: ReturnPosition( playerid ) { SetPlayerPos( playerid, Position[ playerid ][ 0 ], Position[ playerid ][ 1 ], Position[ playerid ][ 2 ] ); SetPlayerFacingAngle( playerid, Position[ playerid ][ 3 ] ); } Public: GodUpdate( ) { foreach(Player, i ) { if ( P_DATA[ i ][ God ] == 1 ) SetPlayerHealth( i, 100000 ); if ( P_DATA[ i ][ CarGod ] == 1 && IsPlayerInAnyVehicle( i ) ) SetVehicleHealth( GetPlayerVehicleID( i ), 10000 ); } } //======================================================== [ Stocks ] ============================================================// stock PlayerName( i ) { new n[ 24 ]; GetPlayerName( i, n, 24 ); return n; } stock SpectatePlayer( playerid, PID ) { new string[ 100 ], Float:health, Float:armour; foreach(Player, i ) if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) AdvanceSpectate( i ); SetPlayerInterior( playerid, GetPlayerInterior( PID ) ); TogglePlayerSpectating( playerid, 1 ); if ( IsPlayerInAnyVehicle( PID ) ) { PlayerSpectateVehicle( playerid, GetPlayerVehicleID( PID ) ); P_DATA[ playerid ][ SpecID ] = PID; P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_VEHICLE; } else { PlayerSpectatePlayer( playerid, PID ); P_DATA[ playerid ][ SpecID ] = PID; P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_PLAYER; } GetPlayerName( PID, string, sizeof( string ) ); GetPlayerHealth( PID, health ); GetPlayerArmour( PID, armour ); format( string, sizeof( string ),"~n~~n~~n~~n~~n~~n~~n~n~~w~%s - id:%d~n~< sprint - jump >~n~~r~Health:%0.1f ~b~Armour:%0.1f~n~~g~$%d~n~~g~%d", string, PID, health, armour, GetPlayerMoney( PID ), GetPlayerScore( PID ) ); GameTextForPlayer( playerid, string, 25000, 3 ); return 1; } stock StopSpectate( playerid ) { TogglePlayerSpectating( playerid, 0 ); P_DATA[ playerid ][ SpecID ] = INVALID_PLAYER_ID; P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_NONE; GameTextForPlayer( playerid,"~n~~n~~n~~w~Spectate mode ended", 1000, 3 ); return 1; } stock AdvanceSpectate( playerid ) { if ( ConnectedPlayers( ) == 2 ) return StopSpectate( playerid ); if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) { for ( new i = P_DATA[ playerid ][ SpecID] +1; i <= MAX_PLAYERS; i++ ) { if ( i == MAX_PLAYERS ) i = 0; if ( IsPlayerConnected( i ) && i != playerid ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] != INVALID_PLAYER_ID || ( GetPlayerState( i ) != 1 && GetPlayerState( i ) != 2 && GetPlayerState( i ) != 3 ) ) { continue; } else { SpectatePlayer( playerid, i ); break; } } } } return 1; } stock ConnectedPlayers( ) { new Connected; foreach(Player, i ) Connected++; return Connected; } #if defined VIPS_SEND_COMMAND stock SendVipsCommand( playerid, cmdtext[ ] ) { new str[ 128 ]; format( str, sizeof( str ),"[V.I.P] {00FF00}%s(%d) {FF5500}has used command {00FF00}%s", PlayerName( playerid ), playerid, cmdtext ); return SendVipMessage( COLOR_VIP, str ); } #endif stock ReverseSpectate( playerid ) { if ( ConnectedPlayers( ) == 2 ) { StopSpectate( playerid ); return 1; } if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) { for ( new i = P_DATA[ playerid ][ SpecID ]-1; i >= 0; i-- ) { if ( i == 0 ) i = MAX_PLAYERS; if ( IsPlayerConnected( i ) && i != playerid ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] != INVALID_PLAYER_ID || ( GetPlayerState( i ) != 1 && GetPlayerState( i ) != 2 && GetPlayerState( i ) != 3 ) ) { continue; } else { SpectatePlayer( playerid, i ); break; } } } } return 1; } stock SendPlayerMaxAmmo( playerid ) { new slot, weap, ammo; for ( slot = 0; slot < 14; slot++ ) { GetPlayerWeaponData( playerid, slot, weap, ammo ); if ( IsValidWeapon( weap ) ) { GivePlayerWeapon( playerid, weap, 99999 ); } } return 1; } stock IsValidWeapon( weaponid ) { if ( weaponid > 0 && weaponid < 19 || weaponid > 21 && weaponid < 47 ) return 1; return 0; } //============================================================ [ EOF ] ===========================================================// Pastebin.com Tools & Applications iPhone/iPad Windows Firefox Chrome WebOS Android Mac Opera Click.to UNIX WinPhone create new paste | api | trends | users | faq | tools | privacy | cookies policy | contact | stats | go pro Follow us: pastebin on ******** | pastebin on ******* | pastebin in the news Pastebin v3.1 rendered in: 0.009 seconds #if defined VIP xxSPEEDYxx's V.I.P System - NEW* 3 Levels v2.0 COMMANDS - [v1.0]: V.I.P Level 1 Commands: V.I.P Level 2 Commands: V.I.P Level 3 Commands: /mytime /vsaveskin /vkick /myweather /dontuseskin /vget /myvw /vweapons /rw /mycolor /vipgoto /maxammo /vspec /vasay + V.I.P level 1&2 CMDS /vspecoff + V.I.P level 1 CMDS /spawnme /vcmds COMMANDS - [v2.0]: V.I.P Level 1 Commands: V.I.P Level 2 Commands: V.I.P Level 3 Commands: /ltc[1 - 13] /vipgod /vannounce /viphouse /godcar /vcar /vspa( V.I.P Special Actions! ) /stophold! V.I.P over 35 command! OMG! #endif //============ [ Includes ] ============// #include < a_samp > // Main include! #include < zcmd > // Find it on: https://sampforum.blast.hk/showthread.php?tid=91354&highlight=zcmd #include < sscanf2 > // Find it on: https://sampforum.blast.hk/showthread.ph...2.77121178 #include < foreach > //======================================// #define VIPS_SEND_COMMAND //Comment this if you don't want to show messages whena VIP use a command. #define SHOW_LEVEL_DIALOG //Comment this if you don't want to show the dialog with your VIP level on connect. //============ [ Colours ] ============// #define RED 0xE60000AA #define YELLOW 0xFFFF00AA #define GREEN 0x00FF00AA #define ABLUE 0x2641FEAA #define COLOR_VIP 0xFF5500AA //aka Orange:P //====================================// //========== [ Dialogs ] ==========// /* I put the dialogids bigest to not confuse with other dialogs in your FSs/GM */ enum { MYLVL, VIPS, VIPCMDS, ONCONN, VSPA }; //====================================// //============= [ Level Check ] ======// stock bool:False = false ; #define VipCheck(%0,%1)\ do{\ if(P_DATA[(%0)][Vip] < (%1)){\ new Str[128];\ format(Str, 128, "~r~~h~ERROR!~n~~w~You need to be V.I.P level ~y~~h~%d ~w~to use this command!", (%1));\ return GameTextForPlayer((%0), Str, 3000, 4);\ }\ }\ while(False) //============= [ SPEC ] =============// #define ADMIN_SPEC_TYPE_NONE (0) #define ADMIN_SPEC_TYPE_PLAYER (1) #define ADMIN_SPEC_TYPE_VEHICLE (2) /* Do not touch this! */ //=========== [ Shortcuts ] ==========// #define Public:%0(%1) \ forward%0(%1); public%0(%1) //====================================// //========== [ News&Enums ] ==========// enum pInfo { Vip, SpecID, SpecType, God, CarGod, p_FavSkin }; new P_DATA[ MAX_PLAYERS ][ pInfo ]; new DB:Database; new Float:Position[ MAX_PLAYERS ][ 4 ]; //====================================// //==================== [ CallBacks ] =========================================// public OnFilterScriptInit( ) { Database = db_open( "Vips.db" ); //Name of the database! You can change it! db_query( Database, "CREATE TABLE IF NOT EXISTS `Vips` (`Key` INTEGER PRIMARY KEY AUTOINCREMENT, `Nume` TEXT, `VipLevel` NUMERIC, `VSkin` NUMERIC)" ); return 1; } public OnFilterScriptExit( ) return db_close( Database ); public OnPlayerConnect( playerid ) { new Query[ 256 ], string[ 128 ], DBResult:Result, Field[ 30 ] ; format( Query, sizeof( Query ), "SELECT * FROM `Vips` WHERE `Nume` = '%s'", PlayerName( playerid ) ); Result = db_query( Database, Query ); if ( Result ) { if ( db_num_rows( Result ) ) { db_get_field_assoc( Result, "VipLevel", Field, 4 ); P_DATA[ playerid ][ Vip ] = strval( Field ); db_get_field_assoc( Result, "VSkin", Field, 4 ); P_DATA[ playerid ][ p_FavSkin ] = strval( Field ); #if defined SHOW_LEVEL_DIALOG format( string, sizeof( string ), "\t{FF5500}Your V.I.P Level:\n\n{FF5500}You have V.I.P level {00FF00}%d\n\n{E60000}Congratulations!", P_DATA[ playerid ][ Vip ] ); ShowPlayerDialog( playerid, ONCONN, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", string, "Quit", "" ); #endif } else { P_DATA[ playerid ][ Vip ] = 0; P_DATA[ playerid ][ p_FavSkin ] = -1; format( Query, sizeof Query, "INSERT INTO `Vips` VALUES(NULL,'%s','0','-1')", PlayerName( playerid ) ); db_query( Database, Query ); #if defined SHOW_LEVEL_DIALOG ShowPlayerDialog( playerid, ONCONN+1, DIALOG_STYLE_MSGBOX, "{00FF00}V.I.P", "{E60000}This username have V.I.P level 0", "Quit", "" ); #endif } db_free_result( Result ); } return 1; } public OnPlayerDisconnect( playerid ) { new sz_Query[ 128 ] ; format( sz_Query, sizeof sz_Query, "UPDATE `Vips` SET `VipLevel` = '%d',`VSkin` = '%d' WHERE `Nume` = '%s'", P_DATA[ playerid ][ Vip ], P_DATA[ playerid ][ p_FavSkin ], PlayerName( playerid ) ); db_query( Database, sz_Query ); foreach(Player, i ) if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) AdvanceSpectate( i ); return 1; } public OnPlayerDeath( playerid, killerid, reason ) { foreach(Player, i ) if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) AdvanceSpectate( i ); return 1; } public OnPlayerInteriorChange( playerid, newinteriorid, oldinteriorid ) { new i = 0; while( i != MAX_PLAYERS ) { if ( IsPlayerConnected( i ) && GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid && P_DATA[ i ][ SpecType ] == ADMIN_SPEC_TYPE_PLAYER ) { SetPlayerInterior( i, newinteriorid ); } i++; } } public OnPlayerSpawn( playerid ) { if ( P_DATA[ playerid ][ p_FavSkin ] != -1 ) SetPlayerSkin( playerid, P_DATA[ playerid ][ p_FavSkin ] ); return 1; } public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) { if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) { if ( newkeys == KEY_JUMP ) AdvanceSpectate( playerid ); else if ( newkeys == KEY_SPRINT ) ReverseSpectate( playerid ); } return 1; } public OnPlayerEnterVehicle( playerid, vehicleid ) { foreach(Player, i ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) { TogglePlayerSpectating( i, 1 ); PlayerSpectateVehicle( i, vehicleid ); P_DATA[ i ][ SpecType ] = ADMIN_SPEC_TYPE_VEHICLE; } } return 1; } public OnPlayerText( playerid, text[ ] ) { new textstr[ 128 ]; if ( text[ 0 ] == '!' && P_DATA[ playerid ][ Vip ] >= 1 ) { format( textstr, sizeof( textstr ),"V.I.P Chat: {00FF00}%s{FF5500}: %s", PlayerName( playerid ), text[ 1 ] ); SendVipMessage( COLOR_VIP, textstr ); return 0; } return 1; } public OnPlayerExitVehicle( playerid, vehicleid ) { foreach(Player, i ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid && P_DATA[ i ][ SpecType ] == ADMIN_SPEC_TYPE_VEHICLE) { TogglePlayerSpectating( i, 1 ); PlayerSpectatePlayer( i, playerid ); P_DATA[ i ][ SpecType ] = ADMIN_SPEC_TYPE_PLAYER; } } return 1; } public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) { switch( dialogid ) { case VSPA: { if ( !response ) return 1; switch( listitem ) { case 0: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); SendClientMessage( playerid, COLOR_VIP, "You have holded a {00FF00}dick!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 1: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 0, 1114, 1, 0.138007, 0.002714, -0.157366, 350.942352, 16.794704, 32.683506, 0.791829, 0.471535, 1.032759 ); SetPlayerAttachedObject( playerid, 1, 1114, 1, 0.138007, 0.002714, 0.064523, 342.729064, 354.099456, 32.369094, 0.791829, 0.471535, 1.032759 ); SendClientMessage( playerid, COLOR_VIP, "You have holded a {00FF00}iron!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 2: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 0, 18645, 2, 0.017478, 0.051500, 0.003912, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); SetPlayerAttachedObject( playerid, 1, 18690, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); SetPlayerAttachedObject( playerid, 2, 18716, 2, -2.979508, 0.306475, -0.388553, 285.055511, 90.860740, 171.179550, 1.780549, 0.912008, 1.208514 ); SendClientMessage( playerid, COLOR_VIP, "You have holded as {00FF00}Alien!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 3: { for ( new i = 0; i < 5; i++ ) if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) RemovePlayerAttachedObject( playerid, i ); SetPlayerAttachedObject( playerid, 0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 2, 18703, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 3, 18703, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000 ); SetPlayerAttachedObject( playerid, 4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000 ); SendClientMessage( playerid, COLOR_VIP, "You have holded as {00FF00}Icread!" ); SendClientMessage( playerid, COLOR_VIP, "To stop holding please type {00FF00}/stophold!" ); } case 4: { SetPlayerSpecialAction( playerid, 2 ); //Jetpack! SendClientMessage( playerid, COLOR_VIP, "Jetpack Spawmed!" ); } } } } return 1; } //============================================================================// //================ [ Commands v1.0 ] =========================================// CMD:setvip( playerid, params[ ] ) { if ( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, RED, "Only RCON Administrator can use this command!" ); new string[ 128 ], giveplayerid, level ; if ( sscanf( params, "ud", giveplayerid, level ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/setvip [playerid] [level]" ); if ( giveplayerid == INVALID_PLAYER_ID ) return SendClientMessage( playerid, RED, "Player Is Not Connected!" ); if ( level > 3 || level < 0 ) return SendClientMessage( playerid, RED, "ERROR: Invalid level!" ); P_DATA[ giveplayerid ][ Vip ] = level; format( string, sizeof( string ), "Administrator %s has set your V.I.P level to %d!", PlayerName( playerid ), level ); SendClientMessage( giveplayerid, ABLUE, string ); return 1; } CMD:vipgoto( playerid , params[ ] ) { new PID, string[ 128 ]; new Float:x, Float:y, Float:z; VipCheck( playerid, 2 ); if ( sscanf( params, "u", PID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vipgoto [playerid]" ); if ( IsPlayerConnected( PID ) ) return SendClientMessage( playerid, RED, "Player not connected or is yourself!" ); GetPlayerPos( PID , x , y , z ); SetPlayerInterior( playerid , GetPlayerInterior( PID ) ); SetPlayerVirtualWorld( playerid , GetPlayerVirtualWorld( PID ) ); if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) { SetVehiclePos( GetPlayerVehicleID( playerid ) , x+3 , y , z ); LinkVehicleToInterior( GetPlayerVehicleID( playerid ), GetPlayerInterior( PID ) ); SetVehicleVirtualWorld( GetPlayerVehicleID( playerid ), GetPlayerVirtualWorld( PID ) ); format( string , sizeof( string ), "You have teleported to %s's location!" , PlayerName( PID ) ); SendClientMessage( playerid ,COLOR_VIP ,string ); format( string, sizeof( string ), "V.I.P {00FF00}%s(%d) {FF5500}has teleported to your location!", PlayerName( playerid ), P_DATA[ playerid ][ Vip ] ); SendClientMessage( PID, COLOR_VIP, string ); } else { SetPlayerPos( playerid , x+2 , y , z ); format( string, sizeof( string ), "V.I.P {00FF00}%s(%d) {FF5500}has teleported to your location!", PlayerName( playerid ), P_DATA[ playerid ][ Vip ] ); SendClientMessage( PID, COLOR_VIP, string ); format( string , sizeof( string ), "You have teleported to %s's location!" , PlayerName( PID ) ); SendClientMessage( playerid ,COLOR_VIP ,string ); } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vipgoto" ); #endif return 1; } CMD:spawnme( playerid, params[ ] ) { VipCheck( playerid, 1 ); SpawnPlayer( playerid ); SendClientMessage( playerid, COLOR_VIP, "You have been respawmed!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/spawnme" ); #endif return 1; } CMD:vips( playerid, params[ ] ) { new V, lsString[ 1024 ] ; foreach(Player, i ) if ( P_DATA[ i ][ Vip ] > 0 ) { format( lsString, sizeof lsString, "{FF5500}%s\n{FF5500}V.I.P {00FF00}%s {FF5500}- Level {00FF00}%d", lsString, PlayerName( i ), P_DATA[ i ][ Vip ] ); V++; } if ( V == 0 ) format( lsString, sizeof lsString, "\n{E60000}No V.I.Ps online at the moment!" ); return ShowPlayerDialog( playerid, VIPS, DIALOG_STYLE_MSGBOX, "{00FF00}Online V.I.Ps:", lsString, "Quit", "" ); } CMD:myweather( playerid, params[ ] ) { new weather, string[ 128 ]; VipCheck( playerid, 1 ); if ( sscanf( params, "d", weather ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/myweather [weatherid]" ); if ( ( weather < 0 ) || ( weather > 52 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 52 weather ids!" ); SetPlayerWeather( playerid, weather ); format( string, sizeof( string ), "You have set your weather to {E60000}%d", weather ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/myweather" ); #endif return 1; } CMD:mytime( playerid, params[ ] ) { new time, string[ 128 ]; VipCheck( playerid, 1 ); if ( sscanf( params, "d", time ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/mytime [time]" ); if ( ( time < 0 ) || ( time > 24 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 24 hours you can set your time!" ); SetPlayerTime( playerid, time, 0 ); format( string, sizeof( string ), "You have set your time to {E60000}%d", time ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/mytime" ); #endif return 1; } CMD:myvw( playerid, params[ ] ) /* With this function you will be ablle to change your virtual world! Disponible Virtual Worlds are between 0 and 100 you can change to bigest or lowest on this line: if ( ( vw < 0 ) || ( vw > 100 ) ) */ { new vw, string[ 128 ]; VipCheck( playerid, 1 ); if ( sscanf( params, "d", vw ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/myvw [virtualworld]" ); if ( ( vw < 0 ) || ( vw > 100 ) ) return SendClientMessage( playerid, RED, "Only between 0 and 100 Virtual Worlds ar disponible!" ); if ( vw == 0 ) { SetPlayerVirtualWorld( playerid, 0 ); return SendClientMessage( playerid, YELLOW, "You have returned back in normal world( 0 )!" ); } SetPlayerVirtualWorld( playerid, vw ); format( string, sizeof( string ), "You have set your Virtual World to {E60000}%d", vw ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/myvw" ); #endif return 1; } CMD:vasay( playerid, params[ ] ) { new VipMessage[ 180 ]; VipCheck( playerid, 2 ); if ( sscanf( params, "s[ 120 ]", VipMessage ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vasay [text]" ); format( VipMessage, sizeof( VipMessage ), "V.I.P - %s {FFFF00}(lvl: %d): {00FF00}%s", PlayerName( playerid ), P_DATA[ playerid ][ Vip ], VipMessage ); SendClientMessageToAll( COLOR_VIP, VipMessage ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vasay" ); #endif return 1; } CMD:maxammo( playerid, params[ ] ) { VipCheck( playerid, 3 ); SendPlayerMaxAmmo( playerid ); SendClientMessage( playerid, COLOR_VIP, "You have added {00FF00}Max Ammo{FF5500} to your weapons!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/MaxAmmo" ); #endif return 1; } CMD:vweapons( playerid, params[ ] ) { VipCheck( playerid, 2 ); GivePlayerWeapon( playerid ,28, 120) ; // Weapons: Micro SMG || Ammo: 120 GivePlayerWeapon( playerid, 31, 75 ); // Weapons: M4 || Gloante: 75 GivePlayerWeapon( playerid, 34, 15 ); // Weapons: Sniper Rifle || Ammo: 15 GivePlayerWeapon( playerid, 26, 100 ); // Weapons: Sawn-off Shotgun || Ammo: 100 #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vweapons" ); #endif return 1; } CMD:vspec( playerid, params[ ] ) { new PID, string[ 128 ] ; VipCheck( playerid, 1 ); if ( sscanf( params, "u", PID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vspec [playerid]" ); if ( !IsPlayerConnected( PID ) ) return SendClientMessage( playerid, RED, "ERROR: Player is not connected!" ); if ( GetPlayerState( PID ) == PLAYER_STATE_SPECTATING && P_DATA[ PID ][ SpecID ] != INVALID_PLAYER_ID ) return SendClientMessage( playerid, RED, "ERROR: Player spectating someone else!" ); if ( GetPlayerState( PID ) == 1 && GetPlayerState( PID ) == 2 && GetPlayerState( PID ) == 3 ) return SendClientMessage( playerid, RED, "ERROR: Player not spawned!" ); SpectatePlayer( playerid, PID ); GetPlayerPos( playerid, Position[ playerid ][ 0 ], Position[ playerid ][ 1 ], Position[ playerid ][ 2 ] ); GetPlayerFacingAngle( playerid, Position[ playerid ][ 3 ] ); format( string, sizeof( string ), "Now you spectating %s (%d)", PlayerName( PID ), PID ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vspec" ); #endif return 1; } CMD:vspecoff( playerid, params[ ] ) { VipCheck( playerid, 1 ); if ( P_DATA[ playerid ][ SpecType ] == ADMIN_SPEC_TYPE_NONE ) return SendClientMessage( playerid, RED, "ERROR: You are not spectating" ); StopSpectate( playerid ); SetTimerEx("ReturnPosition", 3000, 0, "d", playerid ); SendClientMessage( playerid, COLOR_VIP, "You have stop spectating" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vspecoff" ); #endif return 1; } CMD:vsaveskin( playerid, params[ ] ) { VipCheck( playerid, 2 ); new SkinID, string[ 128 ] ; if ( sscanf( params, "i", SkinID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vsaveskin [Current SkinID]" ); if ( SkinID != GetPlayerSkin( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: Skin enterd don't match with your current skin!" ); if ( SkinID < 0 || SkinID > 300 ) return SendClientMessage( playerid, RED, "ERROR: Invalid skin! Only between 0 and 300 !" ); format( string, sizeof( string ), "You have successfully saved this skin (ID: %d)", SkinID ); SendClientMessage( playerid, COLOR_VIP, string ); SendClientMessage( playerid, COLOR_VIP, "Type /dontuseskin for don't save again this skin!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vsaveskin" ); #endif return 1; } CMD:dontuseskin( playerid, params[ ] ) { VipCheck( playerid, 2 ); P_DATA[ playerid ][ p_FavSkin ] = -1; SetPlayerSkin( playerid, random( 300 ) ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/dontuseskin" ); #endif SendClientMessage( playerid, COLOR_VIP, "Your saved skin is never been used!" ); return 1; } CMD:mycolor( playerid, params[ ] ) { VipCheck( playerid, 1 ); new Colour, colour[ 7 ]; if ( sscanf( params, "d", Colour ) ) return SendClientMessage( playerid, RED, "ERROR: {FFFF00}/mycolor [color]" ), SendClientMessage( playerid, RED, "0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" ); if ( Colour > 8 ) return SendClientMessage( playerid, RED, "Colours: 0 = Black | 1 = White | 2 = Red | 3 = Orange | 4 = Yellow | 5 = Green | 6 = Blue | 7 = Purple | 8 = Brown" ); switch ( Colour ) { case 0: SetPlayerColor( playerid, 0x000000AA ), colour = "Black"; case 1: SetPlayerColor( playerid, 0xFFFFFFAA ), colour = "White"; case 2: SetPlayerColor( playerid, 0xE60000AA ), colour = "Red"; case 3: SetPlayerColor( playerid, 0xFF5500AA ), colour = "Orange"; case 4: SetPlayerColor( playerid, 0xFFFF00AA ), colour = "Yellow"; case 5: SetPlayerColor( playerid, 0x00FF00AA ), colour = "Green"; case 6: SetPlayerColor( playerid, 0x0000BBAA ), colour = "Blue"; case 7: SetPlayerColor( playerid, 0x800080AA ), colour = "Purple"; case 8: SetPlayerColor( playerid, 0xA52A2AAA ), colour = "Brown"; } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/mycolor" ); #endif return 1; } CMD:vcmds( playerid, params[ ] ) { VipCheck( playerid, 1 ); new string[ 1024 ]; strcat( string, "{FF5500}V.I.P Level {00FF00}1 {FF5500}Commands:\t{FF5500}V.I.P Level {00FF00}2 {FF5500}Commands:\t{FF5500}V.I.P Level {00FF00}3 {FF5500}Commands:\n\n" ); strcat( string, "{FFFF00}/mytime\t\t\t/vsaveskin\t\t\t/vkick\n" ); strcat( string, "/myweather\t\t\t/dontuseskin\t\t\t/vget\n" ); strcat( string, "/myvw\t\t\t\t/vweapons\t\t\t/rw\n" ); strcat( string, "/mycolor\t\t\t/vipgoto\t\t\t/maxammo\n" ); strcat( string, "/vspec\t\t\t\t/vasay\t\t\t\t\n" ); strcat( string, "/vspecoff\n/spawnme\n/vcmds\n" ); strcat( string, "{E60000}/ltc[1-13]\t\t\t/vipgod\t\t\t/vannounce\n" ); strcat( string, "{E60000}/godcar\n/vcar\n/vspa\n/stophold\n/viphouse\n" ); strcat( string, "\t\t\t\t{FFFF00}+V.I.P level 1 CMDS\t\t+ V.I.P level 1&2 CMDS\n\n\n" ); strcat( string, "{FF5500}Use simbol {00FF00}! {FF5500}in front of your text to speak in V.I.P Chat\n" ); ShowPlayerDialog( playerid, VIPCMDS, DIALOG_STYLE_MSGBOX, "V.I.P Commands:", string, "Quit", "" ); return 1; } CMD:vget( playerid, params[ ] ) { new PID, string[ 256 ]; new Float:x, Float:y, Float:z; VipCheck( playerid, 3 ); if ( sscanf( params, "u", PID ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vget [playerid]" ); if ( !IsPlayerConnected( PID ) ) return SendClientMessage( playerid, RED, "Player is not connected or is yourself!" ); GetPlayerPos( playerid, x, y, z ); SetPlayerInterior( PID, GetPlayerInterior( playerid ) ); SetPlayerVirtualWorld( PID, GetPlayerVirtualWorld( playerid ) ); if ( GetPlayerState( PID ) == 2 ) { new VehicleID = GetPlayerVehicleID( PID ); SetVehiclePos( VehicleID, x+3, y, z); LinkVehicleToInterior( VehicleID, GetPlayerInterior( PID ) ); SetVehicleVirtualWorld( GetPlayerVehicleID( PID ), GetPlayerVirtualWorld( PID ) ); format( string, sizeof( string ),"You have been teleported to V.I.P {00FF00}%s's {FF5500}location", PlayerName( playerid ) ); SendClientMessage( PID, COLOR_VIP, string ); format( string, sizeof( string ),"You have teleported {00FF00}%s {FF5500}to your location", PlayerName( PID ) ); SendClientMessage( playerid, COLOR_VIP, string ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vget" ); #endif } else { SetPlayerPos( PID, x+2, y, z ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vget" ); #endif format( string, sizeof( string ),"You have been teleported to V.I.P {00FF00}%s's {FF5500}location", PlayerName( playerid ) ); SendClientMessage( PID, COLOR_VIP, string ); format( string, sizeof( string ),"You have teleported {00FF00}%s {FF5500}to your location", PlayerName( PID ) ); SendClientMessage( playerid, COLOR_VIP, string ); } return 1; } CMD:vkick( playerid, params[ ] ) { new string[ 128 ]; VipCheck( playerid, 3 ); if ( sscanf( params, "us[ 128 ]", params[ 0 ], params[ 1 ] ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vkick [playerid] [reason]" ); if ( IsPlayerConnected( params[ 0 ] ) ) return SendClientMessage( playerid, RED, "Player is not connected !" ); if ( !strlen( params[ 1 ] ) ) { format( string, sizeof( string ), "%s {FF5500}has been kicked by V.I.P {00FF00}%s {FF5500}[no reason given]!",PlayerName( params[ 0 ] ), PlayerName( playerid ) ); SendClientMessageToAll( GREEN, string ); Kick( params[ 0 ] ); } else { format( string, sizeof( string ), "%s {FF5500}has been kicked by V.I.P {00FF00}%s {FF5500}[reason: {00FF00%s{FF5500}] ", PlayerName( params[ 0 ] ), PlayerName( playerid ), params[ 1 ] ); SendClientMessageToAll( GREEN, string ); Kick( params[ 0 ] ); } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vkick" ); #endif return 1; } CMD:rw( playerid, params[ ] ) { VipCheck( playerid, 3 ); GivePlayerWeapon( playerid, 4, 1); //Knife GivePlayerWeapon( playerid, 28, 1000); // Micro - SMG GivePlayerWeapon( playerid, 26, 100); // Sawn-off Shotgun GivePlayerWeapon( playerid, 22, 500); // 9mm Pistol //Source: https://sampwiki.blast.hk/wiki/Weapons ! SendClientMessage( playerid, COLOR_VIP, "You got an Runing Weapons package!" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vkick" ); #endif return 1; } CMD:vipgod( playerid, params[ ] ) { VipCheck( playerid, 2 ); switch( P_DATA[ playerid ][ God ] ) { case 0: { P_DATA[ playerid ][ God ] = 1; SendClientMessage( playerid, COLOR_VIP, "You have activated the V.I.P {00FF00}God Mode!" ); } case 1: P_DATA[ playerid ][ God ] = 0; } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vipgod" ); #endif return 1; } CMD:godcar( playerid, params[ ] ) { VipCheck( playerid, 1 ); switch( P_DATA[ playerid ][ CarGod ] ) { case 0: { P_DATA[ playerid ][ CarGod ] = 1; SendClientMessage( playerid, COLOR_VIP, "You have activated the Vehicle {00FF00}God Mode!" ); } case 1: P_DATA[ playerid ][ CarGod ] = 0; } #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/GodCar" ); #endif return 1; } CMD:ltc1( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc1" ); #endif GetPlayerPos( playerid, x, y, z); GetPlayerFacingAngle( playerid, Angle ); VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, VehiclulRt, 0); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent(VehiclulRt, 1140); AddVehicleComponent(VehiclulRt, 1170); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent(VehiclulRt, 1140); AddVehicleComponent(VehiclulRt, 1170); AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); ChangeVehiclePaintjob( VehiclulRt, 0 ); SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc2( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc2" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, VehiclulRt, 0 ); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1170 ); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1170 ); AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); ChangeVehiclePaintjob( VehiclulRt, 1 ); SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc3( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, VehiclulRt; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc3" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); VehiclulRt = CreateVehicle( 560, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, VehiclulRt, 0 ); AddVehicleComponent( VehiclulRt, 1028 ); AddVehicleComponent( VehiclulRt, 1138 ); AddVehicleComponent( VehiclulRt, 1170 ); AddVehicleComponent( VehiclulRt, 1030 ); AddVehicleComponent( VehiclulRt, 1031 ); AddVehicleComponent( VehiclulRt, 1140 ); AddVehicleComponent( VehiclulRt, 1080 ); AddVehicleComponent( VehiclulRt, 1086 ); AddVehicleComponent( VehiclulRt, 1087 ); AddVehicleComponent( VehiclulRt, 1010 ); PlayerPlaySound( playerid, 1133, 0.0, 0.0, 0.0 ); ChangeVehiclePaintjob( VehiclulRt, 2 ); SetVehicleVirtualWorld( VehiclulRt, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( VehiclulRt, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc4( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc4" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 559, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1065 ); AddVehicleComponent( carid, 1067 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1162 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc5( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc5" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 565, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1046 ); AddVehicleComponent( carid, 1049 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1053 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc6( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc6" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1088 ); AddVehicleComponent( carid, 1092 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1139 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc7( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc7" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 561, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1055 ); AddVehicleComponent( carid, 1058 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1064 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc8( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc8" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 562, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1034 ); AddVehicleComponent( carid, 1038 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1147 ); AddVehicleComponent( carid, 1010 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc9( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc9" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 567, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1102 ); AddVehicleComponent( carid, 1129 ); AddVehicleComponent( carid, 1188 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1086 ); AddVehicleComponent( carid, 1133 ); AddVehicleComponent( carid, 1186 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1085 ); ChangeVehiclePaintjob( carid, 1 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc10( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc10" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 558, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1092 ); AddVehicleComponent( carid, 1166 ); AddVehicleComponent( carid, 1165 ); AddVehicleComponent( carid, 1090 ); AddVehicleComponent( carid, 1094 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1163 ); AddVehicleComponent( carid, 1091 ); ChangeVehiclePaintjob( carid, 2 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc11( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc11" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 557, x, y, z, Angle, 1, 1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1081 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc12( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc12" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 535, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); ChangeVehiclePaintjob( carid, 1 ); AddVehicleComponent( carid, 1109 ); AddVehicleComponent( carid, 1115 ); AddVehicleComponent( carid, 1117 ); AddVehicleComponent( carid, 1073 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1087 ); AddVehicleComponent( carid, 1114 ); AddVehicleComponent( carid, 1081 ); AddVehicleComponent( carid, 1119 ); AddVehicleComponent( carid, 1121 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:ltc13( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/ltc13" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 562, x, y, z, Angle, 1, -1, -1 ); PutPlayerInVehicle( playerid, carid, 0 ); AddVehicleComponent( carid, 1034 ); AddVehicleComponent( carid, 1038 ); AddVehicleComponent( carid, 1147 ); AddVehicleComponent( carid, 1010 ); AddVehicleComponent( carid, 1073 ); ChangeVehiclePaintjob( carid, 0 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); return 1; } CMD:vcar( playerid, params[ ] ) { new Float:x, Float:y, Float:z, Float:Angle, carid; VipCheck( playerid, 1 ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, RED, "ERROR: You already have a vehicle" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vcar" ); #endif GetPlayerPos( playerid, x, y, z ); GetPlayerFacingAngle( playerid, Angle ); carid = CreateVehicle( 402, x, y, z, Angle, 0, 0, 0 ); // Car: Buffalo PutPlayerInVehicle( playerid, carid, 0 ); SetVehicleVirtualWorld( carid, GetPlayerVirtualWorld( playerid ) ); LinkVehicleToInterior( carid, GetPlayerInterior( playerid ) ); //Source: https://sampwiki.blast.hk/wiki/Vehicles:...2.77121178 return 1; } CMD:vannounce( playerid, params[ ] ) { VipCheck( playerid, 1 ); if ( sscanf( params, "s[128]", params[ 0 ] ) ) return SendClientMessage( playerid, RED, "USAGE: {FFFF00}/vannounce [playerid]" ); GameTextForAll( params[ 0 ], 6000, 1 ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vannounce" ); #endif return 1; } CMD:vspa( playerid, params[ ] )// V.I.Ps Special Actions( Holds + Jetpack! ) { VipCheck( playerid, 1 ); ShowPlayerDialog( playerid, VSPA, DIALOG_STYLE_LIST, "V.I.P Special Actions!", "Hold: Dick!\nHold: Iron!\nHold: Alien!\nHold: Incred!\nSpawn: JetPack!", "Select", "Cancel" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/vspa" ); #endif return 1; } CMD:stophold( playerid, params[ ] ) { VipCheck( playerid, 1 ); if( !IsPlayerAttachedObjectSlotUsed( playerid, 0 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 1 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 2 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 3 ) && !IsPlayerAttachedObjectSlotUsed( playerid, 4 ) ) return SendClientMessage( playerid, RED, "You are not holding any object" ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/stophold" ); #endif for ( new i = 0; i < 5; i ++ ) { if ( IsPlayerAttachedObjectSlotUsed( playerid, i ) ) { RemovePlayerAttachedObject( playerid, i ); SendClientMessage( i, RED, "You have stopped holding object!" ); } } return 1; } CMD:viphouse( playerid, params[ ] ) { VipCheck( playerid, 1 ); SetPlayerPos( playerid, -2637.69,1404.24,906.46 ); SetPlayerInterior( playerid, 3 ); RemovePlayerFromVehicle( playerid ); #if defined VIPS_SEND_COMMAND SendVipsCommand( playerid, "/VipHouse" ); #endif SendClientMessage( playerid, COLOR_VIP, "You have teleported to V.I.P House( Club )!" ); return 1; } Public: SendVipMessage( color, const string[ ] ) { foreach(Player, i ) if ( P_DATA[ i ][ Vip ] >= 1 ) SendClientMessage( i, color, string ); return 1; } Public: ReturnPosition( playerid ) { SetPlayerPos( playerid, Position[ playerid ][ 0 ], Position[ playerid ][ 1 ], Position[ playerid ][ 2 ] ); SetPlayerFacingAngle( playerid, Position[ playerid ][ 3 ] ); } Public: GodUpdate( ) { foreach(Player, i ) { if ( P_DATA[ i ][ God ] == 1 ) SetPlayerHealth( i, 100000 ); if ( P_DATA[ i ][ CarGod ] == 1 && IsPlayerInAnyVehicle( i ) ) SetVehicleHealth( GetPlayerVehicleID( i ), 10000 ); } } //======================================================== [ Stocks ] ============================================================// stock PlayerName( i ) { new n[ 24 ]; GetPlayerName( i, n, 24 ); return n; } stock SpectatePlayer( playerid, PID ) { new string[ 100 ], Float:health, Float:armour; foreach(Player, i ) if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] == playerid ) AdvanceSpectate( i ); SetPlayerInterior( playerid, GetPlayerInterior( PID ) ); TogglePlayerSpectating( playerid, 1 ); if ( IsPlayerInAnyVehicle( PID ) ) { PlayerSpectateVehicle( playerid, GetPlayerVehicleID( PID ) ); P_DATA[ playerid ][ SpecID ] = PID; P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_VEHICLE; } else { PlayerSpectatePlayer( playerid, PID ); P_DATA[ playerid ][ SpecID ] = PID; P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_PLAYER; } GetPlayerName( PID, string, sizeof( string ) ); GetPlayerHealth( PID, health ); GetPlayerArmour( PID, armour ); format( string, sizeof( string ),"~n~~n~~n~~n~~n~~n~~n~n~~w~%s - id:%d~n~< sprint - jump >~n~~r~Health:%0.1f ~b~Armour:%0.1f~n~~g~$%d~n~~g~%d", string, PID, health, armour, GetPlayerMoney( PID ), GetPlayerScore( PID ) ); GameTextForPlayer( playerid, string, 25000, 3 ); return 1; } stock StopSpectate( playerid ) { TogglePlayerSpectating( playerid, 0 ); P_DATA[ playerid ][ SpecID ] = INVALID_PLAYER_ID; P_DATA[ playerid ][ SpecType ] = ADMIN_SPEC_TYPE_NONE; GameTextForPlayer( playerid,"~n~~n~~n~~w~Spectate mode ended", 1000, 3 ); return 1; } stock AdvanceSpectate( playerid ) { if ( ConnectedPlayers( ) == 2 ) return StopSpectate( playerid ); if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) { for ( new i = P_DATA[ playerid ][ SpecID] +1; i <= MAX_PLAYERS; i++ ) { if ( i == MAX_PLAYERS ) i = 0; if ( IsPlayerConnected( i ) && i != playerid ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] != INVALID_PLAYER_ID || ( GetPlayerState( i ) != 1 && GetPlayerState( i ) != 2 && GetPlayerState( i ) != 3 ) ) { continue; } else { SpectatePlayer( playerid, i ); break; } } } } return 1; } stock ConnectedPlayers( ) { new Connected; foreach(Player, i ) Connected++; return Connected; } #if defined VIPS_SEND_COMMAND stock SendVipsCommand( playerid, cmdtext[ ] ) { new str[ 128 ]; format( str, sizeof( str ),"[V.I.P] {00FF00}%s(%d) {FF5500}has used command {00FF00}%s", PlayerName( playerid ), playerid, cmdtext ); return SendVipMessage( COLOR_VIP, str ); } #endif stock ReverseSpectate( playerid ) { if ( ConnectedPlayers( ) == 2 ) { StopSpectate( playerid ); return 1; } if ( GetPlayerState( playerid ) == PLAYER_STATE_SPECTATING && P_DATA[ playerid ][ SpecID ] != INVALID_PLAYER_ID ) { for ( new i = P_DATA[ playerid ][ SpecID ]-1; i >= 0; i-- ) { if ( i == 0 ) i = MAX_PLAYERS; if ( IsPlayerConnected( i ) && i != playerid ) { if ( GetPlayerState( i ) == PLAYER_STATE_SPECTATING && P_DATA[ i ][ SpecID ] != INVALID_PLAYER_ID || ( GetPlayerState( i ) != 1 && GetPlayerState( i ) != 2 && GetPlayerState( i ) != 3 ) ) { continue; } else { SpectatePlayer( playerid, i ); break; } } } } return 1; } stock SendPlayerMaxAmmo( playerid ) { new slot, weap, ammo; for ( slot = 0; slot < 14; slot++ ) { GetPlayerWeaponData( playerid, slot, weap, ammo ); if ( IsValidWeapon( weap ) ) { GivePlayerWeapon( playerid, weap, 99999 ); } } return 1; } stock IsValidWeapon( weaponid ) { if ( weaponid > 0 && weaponid < 19 || weaponid > 21 && weaponid < 47 ) return 1; return 0; } //============================================================ [ EOF ] ===========================================================//