Advertisement
Guest User

Gang

a guest
Jun 2nd, 2013
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.62 KB | None | 0 0
  1. //Gang system by hustrine
  2. //Version 0.1 Beta
  3.  
  4. #include            <   a_samp  >
  5. #include            <   zcmd    >
  6. #include            <   sscanf2  >
  7. #include            <   Dini    >
  8.  
  9.  
  10. #define             MAX_GAUJU               100
  11. #define             GANG_COST               80000
  12.  
  13.  
  14. enum gang
  15. {
  16.     gName[ 40 ],
  17.     gLead[ MAX_PLAYER_NAME ],
  18.     bool:gInvite,
  19.     gLeader,
  20.     InGang,
  21.     Float:gX,
  22.     Float:gY,
  23.     Float:gZ
  24. }
  25. new
  26.     gData[ MAX_GAUJU ][ gang ]
  27. ;
  28.  
  29. public OnFilterScriptInit()
  30. {
  31.     return 1;
  32. }
  33.  
  34. public OnFilterScriptExit()
  35. {
  36.     return 1;
  37. }
  38.  
  39.  
  40. public OnPlayerConnect(playerid)
  41. {
  42.     return 1;
  43. }
  44.  
  45. public OnPlayerDisconnect(playerid, reason)
  46. {
  47.     return 1;
  48. }
  49.  
  50. public OnPlayerSpawn(playerid)
  51. {
  52.     return 1;
  53. }
  54.  
  55. public OnPlayerDeath(playerid, killerid, reason)
  56. {
  57.     return 1;
  58. }
  59.  
  60. public OnVehicleSpawn(vehicleid)
  61. {
  62.     return 1;
  63. }
  64.  
  65. public OnVehicleDeath(vehicleid, killerid)
  66. {
  67.     return 1;
  68. }
  69.  
  70. public OnPlayerText(playerid, text[])
  71. {
  72.     return 1;
  73. }
  74.  
  75. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  76. {
  77.     return 1;
  78. }
  79.  
  80. public OnPlayerExitVehicle(playerid, vehicleid)
  81. {
  82.     return 1;
  83. }
  84.  
  85. public OnPlayerStateChange(playerid, newstate, oldstate)
  86. {
  87.     return 1;
  88. }
  89.  
  90. public OnPlayerEnterCheckpoint(playerid)
  91. {
  92.     return 1;
  93. }
  94.  
  95. public OnPlayerLeaveCheckpoint(playerid)
  96. {
  97.     return 1;
  98. }
  99.  
  100. public OnPlayerEnterRaceCheckpoint(playerid)
  101. {
  102.     return 1;
  103. }
  104.  
  105. public OnPlayerLeaveRaceCheckpoint(playerid)
  106. {
  107.     return 1;
  108. }
  109.  
  110. public OnRconCommand(cmd[])
  111. {
  112.     return 1;
  113. }
  114.  
  115. public OnPlayerRequestSpawn(playerid)
  116. {
  117.     return 1;
  118. }
  119.  
  120. public OnObjectMoved(objectid)
  121. {
  122.     return 1;
  123. }
  124.  
  125. public OnPlayerObjectMoved(playerid, objectid)
  126. {
  127.     return 1;
  128. }
  129.  
  130. public OnPlayerPickUpPickup(playerid, pickupid)
  131. {
  132.     return 1;
  133. }
  134.  
  135. public OnVehicleMod(playerid, vehicleid, componentid)
  136. {
  137.     return 1;
  138. }
  139.  
  140. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  141. {
  142.     return 1;
  143. }
  144.  
  145. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  146. {
  147.     return 1;
  148. }
  149.  
  150. public OnPlayerSelectedMenuRow(playerid, row)
  151. {
  152.     return 1;
  153. }
  154.  
  155. public OnPlayerExitedMenu(playerid)
  156. {
  157.     return 1;
  158. }
  159.  
  160. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  161. {
  162.     return 1;
  163. }
  164.  
  165. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  166. {
  167.     return 1;
  168. }
  169.  
  170. public OnRconLoginAttempt(ip[], password[], success)
  171. {
  172.     return 1;
  173. }
  174.  
  175. public OnPlayerUpdate(playerid)
  176. {
  177.     return 1;
  178. }
  179.  
  180. public OnPlayerStreamIn(playerid, forplayerid)
  181. {
  182.     return 1;
  183. }
  184.  
  185. public OnPlayerStreamOut(playerid, forplayerid)
  186. {
  187.     return 1;
  188. }
  189.  
  190. public OnVehicleStreamIn(vehicleid, forplayerid)
  191. {
  192.     return 1;
  193. }
  194.  
  195. public OnVehicleStreamOut(vehicleid, forplayerid)
  196. {
  197.     return 1;
  198. }
  199.  
  200. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  201. {
  202.     return 1;
  203. }
  204.  
  205. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  206. {
  207.     return 1;
  208. }
  209.  
  210. CMD:cGang( playerid )
  211. {
  212.     new
  213.         string[ 95 ],
  214.         string2[ 50 ]
  215.     ;
  216.     for( new i = 0; i < MAX_GAUJU; i++ )
  217.     {
  218.         if( GetPlayerMoney( playerid ) < GANG_COST )
  219.         {
  220.             format( string2, 50, "[ Sistema ]: Jums truksta %d LT, norint ikurti gauja!", GANG_COST );
  221.             SendClientMessage( playerid, -1, "string2" );
  222.         }
  223.         else
  224.         {
  225.             GivePlayerMoney( playerid, - GANG_COST );
  226.             gData[ i ][ gLeader ] = 1 ;
  227.             GetPlayerPos( playerid, gData[ i ][ gX ], gData[ i ][ gY ], gData[ i ][ gZ ] );
  228.             CreatePickup( 1254, 1, gData[ i ][ gX ], gData[ i ][ gY ], gData[ i ][ gZ ] );
  229.             format( string, 95, "Gang name: %s\nGang lead: %s", gData[ i ][ gName ], gData[ i ][ gLead ] );
  230.             Create3DTextLabel( string, 0xFFFFFFFF, gData[ i ][ gX ], gData[ i ][ gY ], gData[ i ][ gZ ], 20.0, 0, true );
  231.         }
  232.     }
  233. }
  234.  
  235. CMD:gInvite( playerid )
  236. {
  237.     for( new i = 0; i < MAX_GAUJU; i++ )
  238.     {
  239.         if( gData[ i ][ gLeader ] == 1 )
  240.         {
  241.             new
  242.                 name
  243.             ;
  244.             if( sscanf( params, "r", name ) ) return SendClientMessage( playerid, -1, "[ Sistema ]: Naudokite /gInvete [ name ]" );
  245.             if( name == playerid ) return SendClientMessage( playerid, -1, "[ Sistema ]: Saves kviesti negalite" );
  246.             if( name == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "[ Sistema ]: Tokio zaidejo nera!" );
  247.             {
  248.                 gData[ name ][ gInvite ] = true ;
  249.             }
  250.         }
  251.     }
  252.     return 1;
  253. }
  254.  
  255. CMD:gLeave( playerid )
  256. {
  257.     if( gData[ playerid ][ InGang ] == 0 )
  258.     {
  259.         SendClientMessage( playerid, -1, "[ Sistema ]: Jus nesate gaujoje!" );
  260.     }
  261.     if( gData[ playerid ][ gLeader ] == 1 )
  262.     {
  263.         SendClientMessage( playerid, -1, "[ Sistema ]: Jus esate gaujos vadas! Noredami palikti gauja turite ja sunaikinti!" );
  264.     }
  265.     else
  266.     {
  267.         gData[ playerid ][ InGang ] = 0 ;
  268.         SendClientMessage( playerid, -1, "[ Sistema ]: Palikote gauja!" );
  269.     }
  270. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement