From 75e0b063daf9cd10cb1136e4154d433b0268b81c Mon Sep 17 00:00:00 2001 From: Stev Date: Mon, 10 Sep 2018 00:46:16 +0100 Subject: [PATCH] no message --- .../cnr/commands/admin/admin_one.pwn | 2 +- .../irresistible/cnr/features/_features.pwn | 1 + gamemodes/sf-cnr.pwn | 1216 +---------------- 3 files changed, 17 insertions(+), 1202 deletions(-) diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn index 8c765f2..bb633d6 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn @@ -375,7 +375,7 @@ CMD:aspawn( playerid, params[ ] ) pID ; if ( p_AdminLevel[ playerid ] < 1 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); - else if ( sscanf( params, ""#sscanf_u"", pID ) ) return SendUsage( playerid, "/aspawn [PLAYER_ID]" ); + else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/aspawn [PLAYER_ID]" ); else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "Invalid Player ID." ); else if ( p_PlayerLogged{ pID } == false ) return SendError( playerid, "This player is not logged in." ); else diff --git a/gamemodes/irresistible/cnr/features/_features.pwn b/gamemodes/irresistible/cnr/features/_features.pwn index b8e46b9..8a9099a 100644 --- a/gamemodes/irresistible/cnr/features/_features.pwn +++ b/gamemodes/irresistible/cnr/features/_features.pwn @@ -16,6 +16,7 @@ #include "irresistible\cnr\features\ammunation.pwn" #include "irresistible\cnr\features\duel.pwn" #include "irresistible\cnr\features\crowdfund.pwn" +#include "irresistible\cnr\features\paintball.pwn" // #include "irresistible\cnr\features\pilot.pwn" // #include "irresistible\cnr\features\fishing.pwn" // #include "irresistible\cnr\features\vote.pwn" diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 540faa0..e8aeede 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -51,6 +51,8 @@ native WP_Hash ( buffer[ ], len, const str[ ] ); native IsValidVehicle ( vehicleid ); native gpci ( playerid, serial[ ], len ); +new bool: False = false; + /* ** SF-CNR ** */ #include "irresistible\_main.pwn" @@ -100,7 +102,7 @@ native gpci ( playerid, serial[ ], len ); mysql_function_query(dbHandle,sprintf("UPDATE `GARAGES` SET OWNER=%d,PRICE=%d,INTERIOR=%d WHERE ID=%d",g_garageData[(%0)][E_OWNER_ID],g_garageData[(%0)][E_PRICE],g_garageData[(%0)][E_INTERIOR_ID],(%0)),true,"","") /* Beast Functions */ -new bool: False = false; + #define SendClientMessageToRCON(%1,%2,%3) \ do{foreach(new fI : Player){if (IsPlayerAdmin(fI))format(szNormalString,sizeof(szNormalString),(%2),%3),SendClientMessage(fI,(%1),szNormalString);}}while(False) #define SendClientMessageToCops(%1,%2,%3) \ @@ -1846,48 +1848,6 @@ new p_Methamphetamine [ MAX_PLAYERS char ] ; -/* ** Paintball System ** */ -#define MAX_PAINTBALL_ARENAS ( 6 ) - -enum E_PAINTBALL_DATA -{ - E_NAME[ 16 ], E_HOST, E_PASSWORD[ 5 ], - E_LIMIT, E_WEAPONS[ 3 ], E_PLAYERS, - E_ARENA, Float: E_ARMOUR, Float: E_HEALTH, - bool: E_ACTIVE, bool: E_PASSWORDED, bool: E_REFILLER, - E_CD_TIMER -}; - -enum E_PAINTBALL_ARENAS -{ - Float: E_X, Float: E_Y, Float: E_Z, - E_INTERIOR, E_NAME[ 16 ] -}; - -new - g_paintballArenaData [ ] [ E_PAINTBALL_ARENAS ] = - { - { 1412.639892, -1.787510, 1000.924377, 1 , "Warehouse 1" }, - { 1302.519897, -1.787510, 1001.028259, 18, "Warehouse 2" }, - { 1063.650400, 2134.9487, 10.82030000, 0 , "Warehouse 3" }, - { -2659.28170, 1410.3884, 910.1703000, 3 , "Jizzy's" }, - { 296.8772000, 174.79120, 1007.171900, 3 , "LV-PD" }, - //{ 1265.012900, -775.0262, 1091.906300, 5 , "Mad Doggs" }, - { -1401.68950, 107.43800, 1032.273400, 1 , "Stadium 1" }, - { 2193.399700, -1142.272, 1029.796900, 15, "Jefferson Motel" }, - { -949.294600, 1887.0156, 5.000000000, 17, "Sherman Dam" }, - { 1721.863800, -1655.338, 20.96800000, 18, "Atrium" } - }, - - g_paintballData [ MAX_PAINTBALL_ARENAS ] [ E_PAINTBALL_DATA ], - - bool: p_LeftPaintball [ MAX_PLAYERS char ], - p_PaintBallArena [ MAX_PLAYERS char ], - - // Iterator - Iterator:paintball -; - /* ** Shop Data ** */ #define LIMIT_SCISSORS 16 #define LIMIT_PINS 16 @@ -2836,7 +2796,6 @@ stock Float: distanceFromSafe( iPlayer, iRobbery, &Float: fDistance = Float: 0x7 main() { print( "\n" #SERVER_NAME "\n" ); - CallRemoteFunction( "InitializeTextDraws", "" ); } public OnGameModeInit() @@ -5597,7 +5556,6 @@ public OnPlayerConnect( playerid ) ResetPlayerCash( playerid ); // Create player textdraws and remove buildings - initializePlayerTextDraws( playerid ); removeExcessiveBuildings( playerid ); // Create casino label @@ -6744,6 +6702,18 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b if ( ( weaponid == WEAPON_SNIPER || weaponid == WEAPON_RIFLE ) && bodypart == 9 ) amount *= 1.5; + // Paintball Headshot + if ( issuerid != INVALID_PLAYER_ID && p_inPaintBall{ playerid } == true ) + { + new + lobby_id = p_PaintBallArena{ playerid }; + + if ( g_paintballData[ lobby_id ] [ E_HEADSHOT ] && (weaponid == WEAPON_SNIPER || weaponid == WEAPON_RIFLE ) && bodypart == 9 ) + { + amount *= (1.666 * 2); + } + } + // Increasing weapon damages switch( weaponid ) { @@ -9414,102 +9384,6 @@ CMD:donated( playerid, params[ ] ) return 1; } -CMD:pb( playerid, params[ ] ) return cmd_paintball( playerid, params ); -CMD:paintball( playerid, params[ ] ) -{ - if ( !IsPlayerInPaintBall( playerid ) ) - return SendError( playerid, "You're not in any paintball lobby." ); - - if ( !hasPaintBallArena( playerid ) ) - return SendError( playerid, "This command requires you to be the host of a lobby." ); - - new - id = p_PaintBallArena{ playerid }, - pID - ; - - if ( strmatch( params, "edit" ) ) - { - showPaintBallLobbyData( playerid, id, "Close" ); - } - else if ( !strcmp( params, "kick", false, 4 ) ) - { - if ( sscanf( params[ 5 ], #sscanf_u, pID ) ) return SendUsage( playerid, "/paintball kick [PLAYER_ID]" ); - else if ( !IsPlayerConnected( pID ) ) return SendError( playerid, "This player is not connected." ); - else if ( !IsPlayerInPaintBall( pID ) ) return SendError( playerid, "This player is not in paintball." ); - else if ( p_PaintBallArena{ pID } != id ) return SendError( playerid, "This player is not in your paintball lobby." ); - else if ( pID == playerid ) return SendError( playerid, "You cannot kick yourself." ); - else - { - SendClientMessageToPaintball( id, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" %s(%d) has left the lobby (KICKED)", ReturnPlayerName( pID ), pID ); - LeavePlayerPaintball( pID ); - SetPlayerHealth( pID, -1 ); - } - } - else if ( !strcmp( params, "leader", false, 6 ) ) - { - if ( sscanf( params[ 7 ], #sscanf_u, pID ) ) return SendUsage( playerid, "/paintball paintball [PLAYER_ID]" ); - else if ( !IsPlayerConnected( pID ) ) return SendError( playerid, "This player is not connected." ); - else if ( !IsPlayerInPaintBall( pID ) ) return SendError( playerid, "This player is not in paintball." ); - else if ( p_PaintBallArena{ pID } != id ) return SendError( playerid, "This player is not in your paintball lobby." ); - else if ( pID == playerid ) return SendError( playerid, "You cannot apply this action to yourself." ); - else - { - g_paintballData[ id ] [ E_HOST ] = pID; - SendClientMessageToPaintball( id, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" %s(%d) is the new paintball leader.", ReturnPlayerName( pID ), pID ); - } - } - else if ( !strcmp( params, "countdown", false, 6 ) ) - { - new - iSeconds; - - if ( sscanf( params[ 10 ], "D(10)", iSeconds ) ) return SendUsage( playerid, "/paintball countdown [SECONDS]" ); - else if ( iSeconds < 1 || iSeconds > 30 ) return SendError( playerid, "Please specify countdown seconds between 1 and 30." ); - else - { - SendServerMessage( playerid, "You have started a countdown from %d in your paintball game.", iSeconds ); - - KillTimer( g_paintballData[ id ] [ E_CD_TIMER ] ); - g_paintballData[ id ] [ E_CD_TIMER ] = SetTimerEx( "paintballCountDown", 960, false, "dd", id, iSeconds - 1 ); - } - } - else SendUsage( playerid, "/paintball [EDIT/KICK/COUNTDOWN/LEADER]" ); - return 1; -} - - -function paintballCountDown( paintballid, time ) -{ - if ( paintballid == -1 ) - return; - - if ( !time ) - { - foreach(new playerid : Player) - { - if ( IsPlayerInPaintBall( playerid ) && p_PaintBallArena{ playerid } == paintballid ) - { - GameTextForPlayer( playerid, "~g~GO!", 2000, 3 ); - PlayerPlaySound( playerid, 1057, 0.0, 0.0, 0.0 ); - } - } - g_paintballData[ paintballid ] [ E_CD_TIMER ] = 0xFFFF; - } - else - { - foreach(new playerid : Player) - { - if ( IsPlayerInPaintBall( playerid ) && p_PaintBallArena{ playerid } == paintballid ) - { - GameTextForPlayer( playerid, sprintf( "~y~%d", time ), 2000, 3 ); - PlayerPlaySound( playerid, 1056, 0.0, 0.0, 0.0 ); - } - } - g_paintballData[ paintballid ] [ E_CD_TIMER ] = SetTimerEx( "paintballCountDown", 960, false, "dd", paintballid, time - 1 ); - } -} - CMD:gate( playerid, params[ ] ) { new @@ -19064,231 +18938,6 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) printf( "[xpmarket] %s -> %s", ReturnPlayerName( playerid ), number_format( strval( inputtext ) * EXCHANGE_XPCASH ) ); // 8hska7082bmahu SendServerMessage( playerid, "You have successfully exchanged %d XP for %s dollars.", strval( inputtext ), number_format( strval( inputtext ) * EXCHANGE_XPCASH ) ); } - if ( ( dialogid == DIALOG_PAINTBALL ) && response ) - { - for( new id, x = 0; id < MAX_PAINTBALL_ARENAS; id ++ ) - { - if ( x == listitem ) - { - if ( Iter_Contains(paintball, id) ) - { - if ( !g_paintballData[ id ] [ E_ACTIVE ] ) - { - SendError( playerid, "This paintball lobby is currently not active and being edited." ); - listPaintBallLobbies( playerid ); - return 1; - } - - if ( g_paintballData[ id ] [ E_PASSWORDED ] && !isnull( g_paintballData[ id ] [ E_PASSWORD ] ) && !strmatch( g_paintballData[ id ] [ E_PASSWORD ], "NULL" ) ) - { - if ( g_Debugging ) { - SendClientMessageToRCON( COLOR_YELLOW, "PAINTBALL: host %s, passworded %d, password %s", ReturnPlayerName( g_paintballData[ id ] [ E_HOST ] ), g_paintballData[ id ] [ E_PASSWORDED ], g_paintballData[ id ] [ E_PASSWORD ] ); - } - p_PaintBallArena{ playerid } = id; - SendServerMessage( playerid, "You are trying to join the paintball lobby: "COL_GREY"%s", g_paintballData[ id ] [ E_NAME ] ); - ShowPlayerDialog( playerid, DIALOG_PAINTBALL_PW, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Join", "{FFFFFF}This lobby requires a password.", "Join", "Back" ); - return 1; - } - JoinPlayerPaintball( playerid, id ); - } - else - { - if ( hasPaintBallArena( playerid ) ) - return SendError( playerid, "You already have an paintball arena set. You've been spawned." ), SpawnPlayer( playerid ); - - if ( GetPlayerCash( playerid ) < 5000 ) - return listPaintBallLobbies( playerid ), SendError( playerid, "You're insufficient of funds. ($5,000)" ), 1; - - if ( !CreatePaintballLobby( id, playerid, "Paintball", 8, 0 ) ) - return SendError( playerid, "Unable to create lobby due to an error. Maybe someone's occupied the slot?" ); - - GivePlayerCash( playerid, -5000 ); - showPaintBallLobbyData( playerid, id ); - p_PaintBallArena{ playerid } = id; - } - break; - } - x ++; - } - } - if ( dialogid == DIALOG_PAINTBALL_PW ) - { - if ( response ) - { - new - szPassword[ 5 ]; - - strreplacechar( inputtext, '\\', '/' ); - if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "This is no longer available as you're in jail." ); - if ( !Iter_Contains( paintball, p_PaintBallArena{ playerid } ) ) return SendError( playerid, "This lobby no longer exists." ); - if ( sscanf( inputtext, "s[5]", szPassword ) ) return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_PW, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Join", "{FFFFFF}This lobby requires a password.\n\n"COL_RED"Incorrect password, please try again.", "Join", "Back" ); - if ( g_paintballData[ p_PaintBallArena{ playerid } ] [ E_PASSWORDED ] ) { - if ( !strmatch( szPassword, g_paintballData[ p_PaintBallArena{ playerid } ] [ E_PASSWORD ] ) ) return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_PW, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Join", "{FFFFFF}This lobby requires a password.\n\n"COL_RED"Incorrect password, please try again.", "Join", "Back" ); - } - else SendServerMessage( playerid, "Seems like the lobby you were trying to join is not passworded anymore." ); - JoinPlayerPaintball( playerid, p_PaintBallArena{ playerid } ); - } - else listPaintBallLobbies( playerid ); - } - if ( dialogid == DIALOG_PAINTBALL_EDIT ) - { - if ( response ) - { - SetPVarInt( playerid, "paintball_edititem", listitem ); - - switch( listitem ) - { - case 0 .. 4: ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?", "Commit", "Back" ); - case 5: - { - new iLobby = p_PaintBallArena{ playerid }; - g_paintballData[ iLobby ] [ E_REFILLER ] = !g_paintballData[ iLobby ] [ E_REFILLER ]; - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" Upon death, armour and/or health will%s be restored.", g_paintballData[ iLobby ] [ E_REFILLER ] == false ? ( " not" ) : ( "" ) ); - showPaintBallLobbyData( playerid, iLobby ); - } - case 6: ShowPlayerPaintballArenas( playerid ); - case 7 .. 9: ShowPlayerDialog( playerid, DIALOG_PAINTBALL_WEP, DIALOG_STYLE_LIST, "{FFFFFF}Paintball - Edit", ""COL_RED"Remove Weapon On This Slot\n9mm Pistol\nSilenced Pistol\nDesert Eagle\nShotgun\nSawn-off Shotgun\nSpas 12\nMac 10\nMP5\nAK-47\nM4\nTec 9\nRifle\nSniper", "Select", "Cancel"); - } - } - else - { - new - i = p_PaintBallArena{ playerid }; - - if ( !g_paintballData[ i ] [ E_ACTIVE ] ) - { - g_paintballData[ i ] [ E_ACTIVE ] = true; - JoinPlayerPaintball( playerid, i ); - SendServerMessage( playerid, "You can edit your lobby with "COL_GREY"/paintball edit"COL_WHITE"." ); - } - } - } - if ( dialogid == DIALOG_PAINTBALL_EDIT_VAL ) - { - new - iLobby = p_PaintBallArena{ playerid }; - - if ( response ) - { - switch( GetPVarInt( playerid, "paintball_edititem" ) ) - { - case 0: // name - { - new - szName[ 16 ]; - - if ( sscanf( inputtext, "s[16]", szName ) ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Invalid Lobby Name.", "Commit", "Back" ); - - if ( strlen( inputtext ) < 3 || strlen( inputtext ) >= 16 ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"The lobby name must be ranged between 3 and 16 characters.", "Commit", "Back" ); - - format( g_paintballData[ iLobby ] [ E_NAME ], 16, "%s", szName ); - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby name has been updated by %s(%d)", ReturnPlayerName( playerid ), playerid ); - } - case 1: // pw - { - new - szPassword[ 5 ]; - - if ( sscanf( inputtext, "s[5]", szPassword ) ) return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"The password can only be a maximum of 4 characters. Set to NULL to disable.", "Commit", "Back" ); - if ( !strlen( szPassword ) || strlen( szPassword ) >= 5 ) return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"The password can only be a maximum of 4 characters. Set to NULL to disable.", "Commit", "Back" ); - - if ( strmatch( szPassword, "NULL" ) ) - { - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby password has been%sdisabled.", " " ); - g_paintballData[ iLobby ] [ E_PASSWORDED ] = false; - } - else - { - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby password has been changed to: "COL_GREY"%s"COL_WHITE".", szPassword ); - g_paintballData[ iLobby ] [ E_PASSWORDED ] = true; - } - format( g_paintballData[ iLobby ] [ E_PASSWORD ], 5, "%s", szPassword ); - } - case 2: // limit - { - new iLimit; - - if ( sscanf( inputtext, "d", iLimit ) ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Ensure the player capacity is an integer.", "Commit", "Back" ); - - if ( iLimit < 2 || iLimit > 32 ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Please specify between 2 and 32 players.", "Commit", "Back" ); - - if ( iLimit < g_paintballData[ iLobby ] [ E_PLAYERS ] ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Your limit can not be less than the number of players joined already.", "Commit", "Back" ); - - g_paintballData[ iLobby ] [ E_LIMIT ] = iLimit; - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby player limit has been set to %d.", g_paintballData[ iLobby ] [ E_LIMIT ] ); - } - case 3: // health - { - new Float: fHealth; - - if ( sscanf( inputtext, "f", fHealth ) ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Ensure the player capacity is a numerical number.", "Commit", "Back" ); - - if ( fHealth < 1 || fHealth > 150 ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Please specify between 1 and 150 health.", "Commit", "Back" ); - - g_paintballData[ iLobby ] [ E_HEALTH ] = fHealth; - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby spawn health has been set to %0.2f.", g_paintballData[ iLobby ] [ E_HEALTH ] ); - - respawnAllInPaintballLobby( iLobby ); - } - case 4: // armour - { - new Float: fArmour; - - if ( sscanf( inputtext, "f", fArmour ) ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Ensure the player capacity is a numerical number.", "Commit", "Back" ); - - if ( fArmour < 0 || fArmour > 150 ) - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT_VAL, DIALOG_STYLE_INPUT, "{FFFFFF}Paintball - Edit", "{FFFFFF}What would you like to set the value of this to?\n\n"COL_RED"Please specify between 0 and 150 armour.", "Commit", "Back" ); - - g_paintballData[ iLobby ] [ E_ARMOUR ] = fArmour; - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby spawn armour has been set to %0.2f.", g_paintballData[ iLobby ] [ E_ARMOUR ] ); - - respawnAllInPaintballLobby( iLobby ); - } - } - showPaintBallLobbyData( playerid, iLobby ); - } - else showPaintBallLobbyData( playerid, iLobby ); - } - if ( dialogid == DIALOG_PAINTBALL_ARENAS ) - { - new - iLobby = p_PaintBallArena{ playerid }; - - if ( response ) - { - g_paintballData[ iLobby ] [ E_ARENA ] = listitem; - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby arena has been set to %s.", g_paintballArenaData[ listitem ] [ E_NAME ] ); - respawnAllInPaintballLobby( iLobby ); - showPaintBallLobbyData( playerid, iLobby ); - } - else showPaintBallLobbyData( playerid, iLobby ); - } - if ( dialogid == DIALOG_PAINTBALL_WEP ) - { - new - iLobby = p_PaintBallArena{ playerid }; - - if ( response ) - { - if ( !listitem ) - g_paintballData[ iLobby ] [ E_WEAPONS ] [ GetPVarInt( playerid, "paintball_edititem" ) - 7 ] = 0; - else - g_paintballData[ iLobby ] [ E_WEAPONS ] [ GetPVarInt( playerid, "paintball_edititem" ) - 7 ] = 21 + listitem; - - SendClientMessageToPaintball( iLobby, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" The lobby weapon set has been%supdated.", " " ); - respawnAllInPaintballLobby( iLobby ); - showPaintBallLobbyData( playerid, iLobby ); - } - else showPaintBallLobbyData( playerid, iLobby ); - } if ( ( dialogid == DIALOG_GPS ) && response ) { if ( p_GPSToggled{ playerid } == true || !IsPlayerInAnyVehicle( playerid ) ) @@ -23171,646 +22820,6 @@ stock SavePlayerData( playerid, bool: logout = false ) return 1; } -forward InitializeTextDraws( ); public InitializeTextDraws( ) -{ - g_ClassBoxTD = TextDrawCreate(40.000000, 170.000000, "_"); - TextDrawBackgroundColor(g_ClassBoxTD, 255); - TextDrawFont(g_ClassBoxTD, 1); - TextDrawLetterSize(g_ClassBoxTD, 0.500000, 16.000000); - TextDrawColor(g_ClassBoxTD, -1); - TextDrawSetOutline(g_ClassBoxTD, 0); - TextDrawSetProportional(g_ClassBoxTD, 1); - TextDrawSetShadow(g_ClassBoxTD, 1); - TextDrawUseBox(g_ClassBoxTD, 1); - TextDrawBoxColor(g_ClassBoxTD, 144); - TextDrawTextSize(g_ClassBoxTD, 170.000000, 10.000000); - - for ( new i = 0; i < sizeof( g_classTextdrawBox ); i ++ ) - { - g_classTextdrawBox[ i ] = TextDrawCreate(40.000000, 138.000000, "_"); - TextDrawBackgroundColor(g_classTextdrawBox[ i ], 255); - TextDrawFont(g_classTextdrawBox[ i ], 1); - TextDrawLetterSize(g_classTextdrawBox[ i ], 0.500000, 3.000000); - TextDrawColor(g_classTextdrawBox[ i ], -1); - TextDrawSetOutline(g_classTextdrawBox[ i ], 0); - TextDrawSetProportional(g_classTextdrawBox[ i ], 1); - TextDrawSetShadow(g_classTextdrawBox[ i ], 1); - TextDrawUseBox(g_classTextdrawBox[ i ], 1); - TextDrawBoxColor(g_classTextdrawBox[ i ], CLASS_COLORS[ i ]); - TextDrawTextSize(g_classTextdrawBox[ i ], 170.000000, 10.000000); - - szLargeString[ 0 ] = '\0'; - - switch ( i ) - { - case 0: { - strcat( szLargeString, "- Select different types of jobs~n~" \ - "- Able to rob stores and players~n~" \ - "- Can gang up with players~n~" \ - "~g~~h~- Accessible to everybody" ); - } - case 1: { - strcat( szLargeString, "- Protect the city from criminals~n~" \ - "- Access to police gun lockers~n~" \ - "- Can arrest/jail people~n~" \ - "~g~~h~- Accessible to everybody" ); - } - case 2: { - strcat( szLargeString, "- Protect the city from criminals~n~" \ - "- Access to police gun lockers~n~" \ - "- Can arrest/jail people~n~" \ - "- Can set roadblocks on roads~n~" \ - "- Can set spike traps on roads~n~" \ - "~r~~h~- Requires 10,000 XP or more" ); - } - case 3: { - strcat( szLargeString, "- Protect the city from criminals~n~" \ - "- Access to police gun lockers~n~" \ - "- Can arrest/jail people~n~" \ - "- Can set roadblocks on roads~n~" \ - "- Can set spike traps on roads~n~" \ - "- Can use combat vehicles~n~" \ - "~r~~h~- Requires 20,000 XP or more" ); - } - case 4: { - strcat( szLargeString, "- Protect the city from criminals~n~" \ - "- Access to police gun lockers~n~" \ - "- Can arrest/jail people~n~" \ - "- Can set roadblocks on roads~n~" \ - "- Can set spike traps on roads~n~" \ - "- Hidden from radar~n~" \ - "~r~~h~- Requires 15,000 XP or more" ); - } - case 5: { - strcat( szLargeString, "- Can heal and cure players~n~" \ - "- Ambulance passengers pay you~n~"\ - "- Able to rob stores and players~n~" \ - "~r~~h~- Requires 1,000 XP or more" ); - } - case 6: { - strcat( szLargeString, "- Protect the city from fires~n~" \ - "- Firetrucks able to extinguish fires~n~"\ - "- Able to rob stores and players~n~" \ - "~r~~h~- Requires 1,000 XP or more" ); - } - } - - g_classTextdrawDescription[ i ] = TextDrawCreate(43.000000, 171.000000, szLargeString); - TextDrawBackgroundColor(g_classTextdrawDescription[ i ], 0); - TextDrawFont(g_classTextdrawDescription[ i ], 1); - TextDrawLetterSize(g_classTextdrawDescription[ i ], 0.190000, 1.100000); - TextDrawColor(g_classTextdrawDescription[ i ], -1); - TextDrawSetOutline(g_classTextdrawDescription[ i ], 1); - TextDrawSetProportional(g_classTextdrawDescription[ i ], 1); - - g_classTextdrawName[ i ] = TextDrawCreate(46.000000, 141.000000, CLASS_NAMES[ i ] ); - TextDrawBackgroundColor(g_classTextdrawName[ i ], 0); - TextDrawFont(g_classTextdrawName[ i ], 3); - TextDrawLetterSize(g_classTextdrawName[ i ], 0.550000, 2.099999); - TextDrawColor(g_classTextdrawName[ i ], i == 0 ? 0x000000FF : 0xFFFFFFFF ); - TextDrawSetOutline(g_classTextdrawName[ i ], 1); - TextDrawSetProportional(g_classTextdrawName[ i ], 1); - TextDrawSetSelectable(g_classTextdrawName[ i ], 0); - } - - g_NotManyPlayersTD = TextDrawCreate(322.000000, 12.000000, "Coin generation increased by 5x as there aren't many players online!"); - TextDrawAlignment(g_NotManyPlayersTD, 2); - TextDrawBackgroundColor(g_NotManyPlayersTD, 0); - TextDrawFont(g_NotManyPlayersTD, 1); - TextDrawLetterSize(g_NotManyPlayersTD, 0.149999, 0.799999); - TextDrawColor(g_NotManyPlayersTD, -16776961); - TextDrawSetOutline(g_NotManyPlayersTD, 1); - TextDrawSetProportional(g_NotManyPlayersTD, 1); - - g_TopDonorTD = TextDrawCreate(320.000000, 2.000000, "Top Donor Lorenc - $0.00, ~w~~h~~h~Latest Donor Lorenc - $0.00"); - TextDrawAlignment(g_TopDonorTD, 2); - TextDrawBackgroundColor(g_TopDonorTD, 0); - TextDrawFont(g_TopDonorTD, 1); - TextDrawLetterSize(g_TopDonorTD, 0.139999, 0.799999); - TextDrawColor(g_TopDonorTD, -2347265); - TextDrawSetOutline(g_TopDonorTD, 1); - TextDrawSetProportional(g_TopDonorTD, 1); - - g_SlotMachineBoxTD[ 0 ] = TextDrawCreate(220.000000, 322.000000, "_"); - TextDrawBackgroundColor(g_SlotMachineBoxTD[ 0 ], 255); - TextDrawLetterSize(g_SlotMachineBoxTD[ 0 ], 0.500000, 7.000000); - TextDrawUseBox(g_SlotMachineBoxTD[ 0 ], 1); - TextDrawBoxColor(g_SlotMachineBoxTD[ 0 ], 112); - TextDrawTextSize(g_SlotMachineBoxTD[ 0 ], 430.000000, 3.000000); - - g_SlotMachineBoxTD[ 1 ] = TextDrawCreate(220.000000, 306.000000, "_"); - TextDrawBackgroundColor(g_SlotMachineBoxTD[ 1 ], 255); - TextDrawLetterSize(g_SlotMachineBoxTD[ 1 ], 0.500000, 1.400000); - TextDrawUseBox(g_SlotMachineBoxTD[ 1 ], 1); - TextDrawBoxColor(g_SlotMachineBoxTD[ 1 ], 238); - TextDrawTextSize(g_SlotMachineBoxTD[ 1 ], 430.000000, -18.000000); - - g_currentXPTD = TextDrawCreate(529.000000, 405.000000, "Current XP"); - TextDrawBackgroundColor(g_currentXPTD, 255); - TextDrawFont(g_currentXPTD, 3); - TextDrawLetterSize(g_currentXPTD, 0.230000, 1.000000); - TextDrawColor(g_currentXPTD, -1); - TextDrawSetOutline(g_currentXPTD, 1); - TextDrawSetProportional(g_currentXPTD, 1); - - g_CurrentRankTD = TextDrawCreate(529.000000, 375.000000, "Current Rank"); - TextDrawBackgroundColor(g_CurrentRankTD, 255); - TextDrawFont(g_CurrentRankTD, 3); - TextDrawLetterSize(g_CurrentRankTD, 0.230000, 1.000000); - TextDrawColor(g_CurrentRankTD, -1); - TextDrawSetOutline(g_CurrentRankTD, 1); - TextDrawSetProportional(g_CurrentRankTD, 1); - - g_CurrentCoinsTD = TextDrawCreate(529.000000, 348.000000, "Total Coins"); - TextDrawBackgroundColor(g_CurrentCoinsTD, 255); - TextDrawFont(g_CurrentCoinsTD, 3); - TextDrawLetterSize(g_CurrentCoinsTD, 0.230000, 1.000000); - TextDrawColor(g_CurrentCoinsTD, -1); - TextDrawSetOutline(g_CurrentCoinsTD, 1); - TextDrawSetProportional(g_CurrentCoinsTD, 1); - - g_DoubleXPTD = TextDrawCreate(516.000000, 423.500000, "x2"); - TextDrawBackgroundColor(g_DoubleXPTD, 255); - TextDrawFont(g_DoubleXPTD, 3); - TextDrawLetterSize(g_DoubleXPTD, 0.230000, 1.000000); - TextDrawColor(g_DoubleXPTD, -1); - TextDrawSetOutline(g_DoubleXPTD, 1); - TextDrawSetProportional(g_DoubleXPTD, 1); - - p_VehiclePreviewCloseTD = TextDrawCreate(191.000000, 319.000000, "Press your ESCAPE KEY to close the preview."); - TextDrawBackgroundColor(p_VehiclePreviewCloseTD, 255); - TextDrawFont(p_VehiclePreviewCloseTD, 2); - TextDrawLetterSize(p_VehiclePreviewCloseTD, 0.259999, 1.399999); - TextDrawColor(p_VehiclePreviewCloseTD, -1); - TextDrawSetOutline(p_VehiclePreviewCloseTD, 1); - TextDrawSetProportional(p_VehiclePreviewCloseTD, 1); - - g_VehiclePreviewBoxTD = TextDrawCreate(500.000000, 150.000000, "__"); - TextDrawBackgroundColor(g_VehiclePreviewBoxTD, 255); - TextDrawLetterSize(g_VehiclePreviewBoxTD, 0.500000, 17.000000); - TextDrawColor(g_VehiclePreviewBoxTD, -1); - TextDrawUseBox(g_VehiclePreviewBoxTD, 1); - TextDrawBoxColor(g_VehiclePreviewBoxTD, 112); - TextDrawTextSize(g_VehiclePreviewBoxTD, 139.000000, 50.000000); - - g_VehiclePreviewTxtTD = TextDrawCreate(130.000000, 135.000000, "Vehicle Preview"); - TextDrawBackgroundColor(g_VehiclePreviewTxtTD, 255); - TextDrawFont(g_VehiclePreviewTxtTD, 0); - TextDrawLetterSize(g_VehiclePreviewTxtTD, 0.720000, 2.000000); - TextDrawColor(g_VehiclePreviewTxtTD, -1); - TextDrawSetOutline(g_VehiclePreviewTxtTD, 1); - TextDrawSetProportional(g_VehiclePreviewTxtTD, 1); - TextDrawSetSelectable(g_VehiclePreviewTxtTD, 0); - - g_ProgressBoxTD = TextDrawCreate(250.000000, 220.000000, "_"); - TextDrawBackgroundColor(g_ProgressBoxTD, 255); - TextDrawFont(g_ProgressBoxTD, 1); - TextDrawLetterSize(g_ProgressBoxTD, 0.500000, 1.000000); - TextDrawColor(g_ProgressBoxTD, -1); - TextDrawSetOutline(g_ProgressBoxTD, 0); - TextDrawSetProportional(g_ProgressBoxTD, 1); - TextDrawSetShadow(g_ProgressBoxTD, 1); - TextDrawUseBox(g_ProgressBoxTD, 1); - TextDrawBoxColor(g_ProgressBoxTD, 255); - TextDrawTextSize(g_ProgressBoxTD, 390.000000, 10.000000); - - g_AdminLogTD = TextDrawCreate(150.000000, 360.000000, "_"); - TextDrawBackgroundColor(g_AdminLogTD, 255); - TextDrawFont(g_AdminLogTD, 1); - TextDrawLetterSize(g_AdminLogTD, 0.210000, 1.000000); - TextDrawColor(g_AdminLogTD, -16289537); - TextDrawSetOutline(g_AdminLogTD, 1); - TextDrawSetProportional(g_AdminLogTD, 1); - - g_AnimationTD = TextDrawCreate(220.000000, 141.000000, "PRESS ~r~~h~~k~~PED_SPRINT~~W~ TO STOP THE ANIMATION"); - TextDrawBackgroundColor(g_AnimationTD, 80); - TextDrawFont(g_AnimationTD, 3); - TextDrawLetterSize(g_AnimationTD, 0.310000, 1.200000); - TextDrawColor(g_AnimationTD, -1); - TextDrawSetOutline(g_AnimationTD, 1); - TextDrawSetProportional(g_AnimationTD, 1); - TextDrawUseBox(g_AnimationTD, 1); - TextDrawBoxColor(g_AnimationTD, 117); - TextDrawTextSize(g_AnimationTD, 418.000000, 0.000000); - - g_AchievementTD[ 0 ] = TextDrawCreate(250.000000, 120.000000, "_"); - TextDrawBackgroundColor(g_AchievementTD[ 0 ], 255); - TextDrawFont(g_AchievementTD[ 0 ], 1); - TextDrawLetterSize(g_AchievementTD[ 0 ], 0.500000, 6.000001); - TextDrawColor(g_AchievementTD[ 0 ], -1); - TextDrawSetOutline(g_AchievementTD[ 0 ], 0); - TextDrawSetProportional(g_AchievementTD[ 0 ], 1); - TextDrawSetShadow(g_AchievementTD[ 0 ], 1); - TextDrawUseBox(g_AchievementTD[ 0 ], 1); - TextDrawBoxColor(g_AchievementTD[ 0 ], 80); - TextDrawTextSize(g_AchievementTD[ 0 ], 403.000000, 4.000000); - - g_AchievementTD[ 1 ] = TextDrawCreate(250.000000, 120.000000, "_"); - TextDrawBackgroundColor(g_AchievementTD[ 1 ], 255); - TextDrawFont(g_AchievementTD[ 1 ], 1); - TextDrawLetterSize(g_AchievementTD[ 1 ], 0.500000, 1.300000); - TextDrawColor(g_AchievementTD[ 1 ], -1); - TextDrawSetOutline(g_AchievementTD[ 1 ], 0); - TextDrawSetProportional(g_AchievementTD[ 1 ], 1); - TextDrawSetShadow(g_AchievementTD[ 1 ], 1); - TextDrawUseBox(g_AchievementTD[ 1 ], 1); - TextDrawBoxColor(g_AchievementTD[ 1 ], 128); - TextDrawTextSize(g_AchievementTD[ 1 ], 403.000000, 4.000000); - - g_AchievementTD[ 2 ] = TextDrawCreate(250.000000, 137.000000, "_"); - TextDrawBackgroundColor(g_AchievementTD[ 2 ], 255); - TextDrawFont(g_AchievementTD[ 2 ], 1); - TextDrawLetterSize(g_AchievementTD[ 2 ], 0.500000, -0.699999); - TextDrawColor(g_AchievementTD[ 2 ], -1); - TextDrawSetOutline(g_AchievementTD[ 2 ], 0); - TextDrawSetProportional(g_AchievementTD[ 2 ], 1); - TextDrawSetShadow(g_AchievementTD[ 2 ], 1); - TextDrawUseBox(g_AchievementTD[ 2 ], 1); - TextDrawBoxColor(g_AchievementTD[ 2 ], 255); - TextDrawTextSize(g_AchievementTD[ 2 ], 403.000000, 4.000000); - - g_AchievementTD[ 3 ] = TextDrawCreate(266.000000, 121.000000, "]_ACHIEVEMENT UNLOCKED_]"); - TextDrawBackgroundColor(g_AchievementTD[ 3 ], 255); - TextDrawFont(g_AchievementTD[ 3 ], 2); - TextDrawLetterSize(g_AchievementTD[ 3 ], 0.210000, 1.100000); - TextDrawColor(g_AchievementTD[ 3 ], -65281); - TextDrawSetOutline(g_AchievementTD[ 3 ], 0); - TextDrawSetProportional(g_AchievementTD[ 3 ], 1); - TextDrawSetShadow(g_AchievementTD[ 3 ], 1); - - g_WorldDayTD = TextDrawCreate(501.000000, 6.000000, "Monday"); - TextDrawBackgroundColor(g_WorldDayTD, 255); - TextDrawFont(g_WorldDayTD, 3); - TextDrawLetterSize(g_WorldDayTD, 0.519998, 1.499999); - TextDrawSetOutline(g_WorldDayTD, 2); - TextDrawSetProportional(g_WorldDayTD, 1); - - g_MotdTD = TextDrawCreate(320.000000, 426.000000, "_"); - TextDrawAlignment(g_MotdTD, 2); - TextDrawBackgroundColor(g_MotdTD, 117); - TextDrawFont(g_MotdTD, 1);//1 - TextDrawLetterSize(g_MotdTD, 0.300000, 1.300000); - TextDrawColor(g_MotdTD, -1); - TextDrawSetOutline(g_MotdTD, 1); - TextDrawSetProportional(g_MotdTD, 1); - - g_ObjectLoadTD = TextDrawCreate(320.000000, 148.000000, "Loading Objects...~n~Please Wait..."); - TextDrawAlignment(g_ObjectLoadTD, 2); - TextDrawBackgroundColor(g_ObjectLoadTD, 80); - TextDrawFont(g_ObjectLoadTD, 2); - TextDrawLetterSize(g_ObjectLoadTD, 0.400000, 2.000000); - TextDrawColor(g_ObjectLoadTD, -1); - TextDrawSetOutline(g_ObjectLoadTD, 1); - TextDrawSetProportional(g_ObjectLoadTD, 1); - TextDrawUseBox(g_ObjectLoadTD, 1); - TextDrawBoxColor(g_ObjectLoadTD, 117); - TextDrawTextSize(g_ObjectLoadTD, 0.000000, 180.000000); - - g_WebsiteTD = TextDrawCreate(84.000000, 429.000000, "www.SFCNR.com"); - TextDrawAlignment(g_WebsiteTD, 2); - TextDrawBackgroundColor(g_WebsiteTD, 255); - TextDrawFont(g_WebsiteTD, 1); - TextDrawLetterSize(g_WebsiteTD, 0.220000, 1.200000); - TextDrawColor(g_WebsiteTD, 0xfa4d4cff); // 1289224191 - TextDrawSetOutline(g_WebsiteTD, 1); - TextDrawSetProportional(g_WebsiteTD, 1); - - g_MovieModeTD[ 0 ] = TextDrawCreate(507.000000, 386.000000, "_"); - TextDrawBackgroundColor(g_MovieModeTD[ 0 ], 255); - TextDrawFont(g_MovieModeTD[ 0 ], 1); - TextDrawLetterSize(g_MovieModeTD[ 0 ], 0.500000, 4.799999); - TextDrawColor(g_MovieModeTD[ 0 ], -1); - TextDrawSetOutline(g_MovieModeTD[ 0 ], 0); - TextDrawSetProportional(g_MovieModeTD[ 0 ], 1); - TextDrawSetShadow(g_MovieModeTD[ 0 ], 1); - TextDrawUseBox(g_MovieModeTD[ 0 ], 1); - TextDrawBoxColor(g_MovieModeTD[ 0 ], 80); - TextDrawTextSize(g_MovieModeTD[ 0 ], 620.000000, 0.000000); - - g_MovieModeTD[ 1 ] = TextDrawCreate(516.000000, 398.000000, "San Fierro"); - TextDrawBackgroundColor(g_MovieModeTD[ 1 ], 255); - TextDrawFont(g_MovieModeTD[ 1 ], 3); - TextDrawLetterSize(g_MovieModeTD[ 1 ], 0.529999, 2.299999); - TextDrawColor(g_MovieModeTD[ 1 ], -2347265); - TextDrawSetOutline(g_MovieModeTD[ 1 ], 1); - TextDrawSetProportional(g_MovieModeTD[ 1 ], 1); - - g_MovieModeTD[ 2 ] = TextDrawCreate(530.000000, 414.000000, "Cops and Robbers"); - TextDrawBackgroundColor(g_MovieModeTD[ 2 ], 255); - TextDrawFont(g_MovieModeTD[ 2 ], 0); - TextDrawLetterSize(g_MovieModeTD[ 2 ], 0.310000, 1.100000); - TextDrawColor(g_MovieModeTD[ 2 ], -1); - TextDrawSetOutline(g_MovieModeTD[ 2 ], 1); - TextDrawSetProportional(g_MovieModeTD[ 2 ], 1); - - g_MovieModeTD[ 3 ] = TextDrawCreate(507.000000, 398.000000, "_"); - TextDrawBackgroundColor(g_MovieModeTD[ 3 ], 255); - TextDrawFont(g_MovieModeTD[ 3 ], 1); - TextDrawLetterSize(g_MovieModeTD[ 3 ], 0.500000, -0.400000); - TextDrawColor(g_MovieModeTD[ 3 ], -1); - TextDrawSetOutline(g_MovieModeTD[ 3 ], 0); - TextDrawSetProportional(g_MovieModeTD[ 3 ], 1); - TextDrawSetShadow(g_MovieModeTD[ 3 ], 1); - TextDrawUseBox(g_MovieModeTD[ 3 ], 1); - TextDrawBoxColor(g_MovieModeTD[ 3 ], 255); - TextDrawTextSize(g_MovieModeTD[ 3 ], 620.000000, 0.000000); - - g_MovieModeTD[ 4 ] = TextDrawCreate(530.000000, 385.000000, "www.SFCNR.com"); - TextDrawBackgroundColor(g_MovieModeTD[ 4 ], 255); - TextDrawFont(g_MovieModeTD[ 4 ], 1); - TextDrawLetterSize(g_MovieModeTD[ 4 ], 0.200000, 1.000000); - TextDrawColor(g_MovieModeTD[ 4 ], 0xfa4d4cff); - TextDrawSetOutline(g_MovieModeTD[ 4 ], 1); - TextDrawSetProportional(g_MovieModeTD[ 4 ], 1); - - g_MovieModeTD[ 5 ] = TextDrawCreate(507.000000, 386.000000, "_"); - TextDrawBackgroundColor(g_MovieModeTD[ 5 ], 255); - TextDrawFont(g_MovieModeTD[ 5 ], 1); - TextDrawLetterSize(g_MovieModeTD[ 5 ], 0.500000, 0.799999); - TextDrawColor(g_MovieModeTD[ 5 ], -1); - TextDrawSetOutline(g_MovieModeTD[ 5 ], 0); - TextDrawSetProportional(g_MovieModeTD[ 5 ], 1); - TextDrawSetShadow(g_MovieModeTD[ 5 ], 1); - TextDrawUseBox(g_MovieModeTD[ 5 ], 1); - TextDrawBoxColor(g_MovieModeTD[ 5 ], 128); - TextDrawTextSize(g_MovieModeTD[ 5 ], 620.000000, 0.000000); - - g_AdminOnDutyTD = TextDrawCreate(552.000000, 66.500000, "ADMIN ON DUTY"); - TextDrawBackgroundColor(g_AdminOnDutyTD, 255); - TextDrawFont(g_AdminOnDutyTD, 1); - TextDrawLetterSize(g_AdminOnDutyTD, 0.180000, 0.899999); - TextDrawColor(g_AdminOnDutyTD, -65281); - TextDrawSetOutline(g_AdminOnDutyTD, 1); - TextDrawSetProportional(g_AdminOnDutyTD, 1); - - /* ** Player TextDraws ** */ - for(new playerid; playerid != MAX_PLAYERS; playerid ++) - { - if ( playerid < MAX_MACHINES ) { - p_SlotMachineFigureTD[ playerid ] = TextDrawCreate(324.000000, 307.000000, "$20,000"); - TextDrawAlignment(p_SlotMachineFigureTD[ playerid ], 2); - TextDrawBackgroundColor(p_SlotMachineFigureTD[ playerid ], 255); - TextDrawFont(p_SlotMachineFigureTD[ playerid ], 3); - TextDrawLetterSize(p_SlotMachineFigureTD[ playerid ], 0.250000, 1.100000); - TextDrawColor(p_SlotMachineFigureTD[ playerid ], -1); - TextDrawSetOutline(p_SlotMachineFigureTD[ playerid ], 1); - TextDrawSetProportional(p_SlotMachineFigureTD[ playerid ], 1); - - g_SlotMachineOneTD[ playerid ] = TextDrawCreate(222.000000, 324.000000, "ld_slot:bar1_o"); - TextDrawBackgroundColor(g_SlotMachineOneTD[ playerid ], 255); - TextDrawFont(g_SlotMachineOneTD[ playerid ], 4); - TextDrawLetterSize(g_SlotMachineOneTD[ playerid ], 0.500000, 0.399999); - TextDrawColor(g_SlotMachineOneTD[ playerid ], -1); - TextDrawSetOutline(g_SlotMachineOneTD[ playerid ], 0); - TextDrawSetProportional(g_SlotMachineOneTD[ playerid ], 1); - TextDrawSetShadow(g_SlotMachineOneTD[ playerid ], 1); - TextDrawUseBox(g_SlotMachineOneTD[ playerid ], 1); - TextDrawBoxColor(g_SlotMachineOneTD[ playerid ], 255); - TextDrawTextSize(g_SlotMachineOneTD[ playerid ], 66.000000, 77.000000); - - g_SlotMachineTwoTD[ playerid ] = TextDrawCreate(292.000000, 324.000000, "ld_slot:bar1_o"); - TextDrawBackgroundColor(g_SlotMachineTwoTD[ playerid ], 255); - TextDrawFont(g_SlotMachineTwoTD[ playerid ], 4); - TextDrawLetterSize(g_SlotMachineTwoTD[ playerid ], 0.500000, 0.399999); - TextDrawColor(g_SlotMachineTwoTD[ playerid ], -1); - TextDrawSetOutline(g_SlotMachineTwoTD[ playerid ], 0); - TextDrawSetProportional(g_SlotMachineTwoTD[ playerid ], 1); - TextDrawSetShadow(g_SlotMachineTwoTD[ playerid ], 1); - TextDrawUseBox(g_SlotMachineTwoTD[ playerid ], 1); - TextDrawBoxColor(g_SlotMachineTwoTD[ playerid ], 255); - TextDrawTextSize(g_SlotMachineTwoTD[ playerid ], 66.000000, 77.000000); - - g_SlotMachineThreeTD[ playerid ] = TextDrawCreate(362.000000, 324.000000, "ld_slot:bar1_o"); - TextDrawBackgroundColor(g_SlotMachineThreeTD[ playerid ], 255); - TextDrawFont(g_SlotMachineThreeTD[ playerid ], 4); - TextDrawLetterSize(g_SlotMachineThreeTD[ playerid ], 0.500000, 0.399999); - TextDrawColor(g_SlotMachineThreeTD[ playerid ], -1); - TextDrawSetOutline(g_SlotMachineThreeTD[ playerid ], 0); - TextDrawSetProportional(g_SlotMachineThreeTD[ playerid ], 1); - TextDrawSetShadow(g_SlotMachineThreeTD[ playerid ], 1); - TextDrawUseBox(g_SlotMachineThreeTD[ playerid ], 1); - TextDrawBoxColor(g_SlotMachineThreeTD[ playerid ], 255); - TextDrawTextSize(g_SlotMachineThreeTD[ playerid ], 66.000000, 77.000000); - } - - p_ProgressBoxOutsideTD[ playerid ] = TextDrawCreate(252.000000, 222.000000, "_"); - TextDrawBackgroundColor(p_ProgressBoxOutsideTD[ playerid ], 255); - TextDrawFont(p_ProgressBoxOutsideTD[ playerid ], 1); - TextDrawLetterSize(p_ProgressBoxOutsideTD[ playerid ], 0.359999, 0.599999); - TextDrawColor(p_ProgressBoxOutsideTD[ playerid ], -1); - TextDrawSetOutline(p_ProgressBoxOutsideTD[ playerid ], 0); - TextDrawSetProportional(p_ProgressBoxOutsideTD[ playerid ], 1); - TextDrawSetShadow(p_ProgressBoxOutsideTD[ playerid ], 1); - TextDrawUseBox(p_ProgressBoxOutsideTD[ playerid ], 1); - TextDrawBoxColor(p_ProgressBoxOutsideTD[ playerid ], -154); - TextDrawTextSize(p_ProgressBoxOutsideTD[ playerid ], 388.000000, 14.000000); - - p_ProgressBoxTD[ playerid ] = TextDrawCreate(252.000000, 222.000000, "_"); - TextDrawBackgroundColor(p_ProgressBoxTD[ playerid ], 255); - TextDrawFont(p_ProgressBoxTD[ playerid ], 1); - TextDrawLetterSize(p_ProgressBoxTD[ playerid ], 0.559999, 0.599999); - TextDrawColor(p_ProgressBoxTD[ playerid ], -1); - TextDrawSetOutline(p_ProgressBoxTD[ playerid ], 0); - TextDrawSetProportional(p_ProgressBoxTD[ playerid ], 1); - TextDrawSetShadow(p_ProgressBoxTD[ playerid ], 1); - TextDrawUseBox(p_ProgressBoxTD[ playerid ], 1); - TextDrawBoxColor(p_ProgressBoxTD[ playerid ], -1); - TextDrawTextSize(p_ProgressBoxTD[ playerid ], 378.000000, 14.000000); - - p_ProgressTitleTD[ playerid ] = TextDrawCreate(320.000000, 205.000000, "____"); - TextDrawAlignment(p_ProgressTitleTD[ playerid ], 2); - TextDrawBackgroundColor(p_ProgressTitleTD[ playerid ], 255); - TextDrawFont(p_ProgressTitleTD[ playerid ], 0); - TextDrawLetterSize(p_ProgressTitleTD[ playerid ], 0.559999, 1.700000); - TextDrawColor(p_ProgressTitleTD[ playerid ], -1); - TextDrawSetOutline(p_ProgressTitleTD[ playerid ], 1); - TextDrawSetProportional(p_ProgressTitleTD[ playerid ], 1); - - p_AchievementTD[ playerid ] = TextDrawCreate(325.000000, 137.000000, "_"); - TextDrawAlignment(p_AchievementTD[ playerid ], 2); - TextDrawBackgroundColor(p_AchievementTD[ playerid ], 80); - TextDrawFont(p_AchievementTD[ playerid ], 1); - TextDrawLetterSize(p_AchievementTD[ playerid ], 0.209999, 1.000000); - TextDrawColor(p_AchievementTD[ playerid ], -1); - TextDrawSetOutline(p_AchievementTD[ playerid ], 1); - TextDrawSetProportional(p_AchievementTD[ playerid ], 1); - - p_FireDistance1[ playerid ] = TextDrawCreate(26.000000, 182.000000, "_"); - TextDrawBackgroundColor(p_FireDistance1[ playerid ], 255); - TextDrawFont(p_FireDistance1[ playerid ], 2); - TextDrawLetterSize(p_FireDistance1[ playerid ], 0.210000, 1.200000); - TextDrawColor(p_FireDistance1[ playerid ], -1); - TextDrawSetOutline(p_FireDistance1[ playerid ], 1); - TextDrawSetProportional(p_FireDistance1[ playerid ], 1); - - p_FireDistance2[ playerid ] = TextDrawCreate(26.000000, 236.000000, "_"); - TextDrawBackgroundColor(p_FireDistance2[ playerid ], 255); - TextDrawFont(p_FireDistance2[ playerid ], 2); - TextDrawLetterSize(p_FireDistance2[ playerid ], 0.209999, 1.200000); - TextDrawColor(p_FireDistance2[ playerid ], -1); - TextDrawSetOutline(p_FireDistance2[ playerid ], 1); - TextDrawSetProportional(p_FireDistance2[ playerid ], 1); - - p_GPSInformation[ playerid ] = TextDrawCreate(26.000000, 200.000000, "~g~Location:~w~ No-where~n~~g~Distance:~w~ 0.0m"); - TextDrawBackgroundColor(p_GPSInformation[ playerid ], 255); - TextDrawFont(p_GPSInformation[ playerid ], 2); - TextDrawLetterSize(p_GPSInformation[ playerid ], 0.209999, 1.099999); - TextDrawColor(p_GPSInformation[ playerid ], -1); - TextDrawSetOutline(p_GPSInformation[ playerid ], 1); - TextDrawSetProportional(p_GPSInformation[ playerid ], 1); - TextDrawSetSelectable(p_GPSInformation[ playerid ], 0); - - p_TruckingTD[ playerid ] = TextDrawCreate(26.000000, 220.000000, "~b~Location:~w~ No-where~n~~b~Distance:~w~ 0.0m"); - TextDrawBackgroundColor(p_TruckingTD[ playerid ], 255); - TextDrawFont(p_TruckingTD[ playerid ], 2); - TextDrawLetterSize(p_TruckingTD[ playerid ], 0.210000, 1.100000); - TextDrawColor(p_TruckingTD[ playerid ], -1); - TextDrawSetOutline(p_TruckingTD[ playerid ], 1); - TextDrawSetProportional(p_TruckingTD[ playerid ], 1); - TextDrawSetSelectable(p_TruckingTD[ playerid ], 0); - - p_TrackPlayerTD[ playerid ] = TextDrawCreate(571.000000, 258.000000, "Loading~n~~w~NaN.0m"); - TextDrawAlignment(p_TrackPlayerTD[ playerid ], 2); - TextDrawBackgroundColor(p_TrackPlayerTD[ playerid ], 80); - TextDrawFont(p_TrackPlayerTD[ playerid ], 1); - TextDrawLetterSize(p_TrackPlayerTD[ playerid ], 0.260000, 1.100000); - TextDrawColor(p_TrackPlayerTD[ playerid ], COLOR_RED); - TextDrawSetOutline(p_TrackPlayerTD[ playerid ], 1); - TextDrawSetProportional(p_TrackPlayerTD[ playerid ], 1); - TextDrawSetSelectable(p_TrackPlayerTD[ playerid ], 0); - - p_HelpBoxTD[ playerid ] = TextDrawCreate(30.000000, 161.000000, "... Loading Help ..."); - TextDrawBackgroundColor(p_HelpBoxTD[ playerid ], 255); - TextDrawFont(p_HelpBoxTD[ playerid ], 1); - TextDrawLetterSize(p_HelpBoxTD[ playerid ], 0.219999, 1.200000); - TextDrawColor(p_HelpBoxTD[ playerid ], -1); - TextDrawSetOutline(p_HelpBoxTD[ playerid ], 0); - TextDrawSetProportional(p_HelpBoxTD[ playerid ], 1); - TextDrawSetShadow(p_HelpBoxTD[ playerid ], 1); - TextDrawUseBox(p_HelpBoxTD[ playerid ], 1); - TextDrawBoxColor(p_HelpBoxTD[ playerid ], 117); - TextDrawTextSize(p_HelpBoxTD[ playerid ], 170.000000, 0.000000); - TextDrawSetSelectable(p_HelpBoxTD[ playerid ], 0); - } - return Y_HOOKS_CONTINUE_RETURN_1; -} - -stock initializePlayerTextDraws( playerid ) -{ - g_ZoneOwnerTD[ playerid ] = CreatePlayerTextDraw( playerid, 86.000000, 296.000000, "_" ); - PlayerTextDrawAlignment( playerid, g_ZoneOwnerTD[ playerid ], 2 ); - PlayerTextDrawBackgroundColor( playerid, g_ZoneOwnerTD[ playerid ], 255 ); - PlayerTextDrawFont( playerid, g_ZoneOwnerTD[ playerid ], 1 ); - PlayerTextDrawLetterSize( playerid, g_ZoneOwnerTD[ playerid ], 0.250000, 1.200000 ); - PlayerTextDrawColor( playerid, g_ZoneOwnerTD[ playerid ], -1 ); - PlayerTextDrawSetOutline( playerid, g_ZoneOwnerTD[ playerid ], 1 ); - - p_JailTimeTD[ playerid ] = CreatePlayerTextDraw(playerid, 328.000000, 24.000000, "Time Remaining:~n~250 seconds"); - PlayerTextDrawAlignment(playerid, p_JailTimeTD[ playerid ], 2); - PlayerTextDrawBackgroundColor(playerid, p_JailTimeTD[ playerid ], 85); - PlayerTextDrawFont(playerid, p_JailTimeTD[ playerid ], 1); - PlayerTextDrawLetterSize(playerid, p_JailTimeTD[ playerid ], 0.329999, 1.500000); - PlayerTextDrawColor(playerid, p_JailTimeTD[ playerid ], -1); - PlayerTextDrawSetOutline(playerid, p_JailTimeTD[ playerid ], 1); - PlayerTextDrawSetProportional(playerid, p_JailTimeTD[ playerid ], 1); - - p_DamageTD[ playerid ] = CreatePlayerTextDraw(playerid, 357.000000, 208.000000, "~r~~h~300.24 DAMAGE"); - PlayerTextDrawBackgroundColor(playerid, p_DamageTD[ playerid ], 255); - PlayerTextDrawFont(playerid, p_DamageTD[ playerid ], 3); - PlayerTextDrawLetterSize(playerid, p_DamageTD[ playerid ], 0.400000, 1.000000); - PlayerTextDrawColor(playerid, p_DamageTD[ playerid ], -1); - PlayerTextDrawSetOutline(playerid, p_DamageTD[ playerid ], 1); - PlayerTextDrawSetProportional(playerid, p_DamageTD[ playerid ], 1); - - p_LocationTD[ playerid ] = CreatePlayerTextDraw( playerid, 86.000000, 322.000000, "Loading..." ); - PlayerTextDrawAlignment( playerid, p_LocationTD[ playerid ], 2 ); - PlayerTextDrawBackgroundColor( playerid, p_LocationTD[ playerid ], 255 ); - PlayerTextDrawFont( playerid, p_LocationTD[ playerid ], 1 ); - PlayerTextDrawLetterSize( playerid, p_LocationTD[ playerid ], 0.240000, 1.299999 ); - PlayerTextDrawSetOutline( playerid, p_LocationTD[ playerid ], 1 ); - PlayerTextDrawColor( playerid, p_LocationTD[ playerid ], -1 ); - PlayerTextDrawSetProportional( playerid, p_LocationTD[ playerid ], 1 ); - - p_ExperienceTD[ playerid ] = CreatePlayerTextDraw( playerid, 529.000000, 414.000000, "00000000" ); - PlayerTextDrawBackgroundColor( playerid, p_ExperienceTD[ playerid ], 144 ); - PlayerTextDrawFont( playerid, p_ExperienceTD[ playerid ], 3 ); - PlayerTextDrawLetterSize( playerid, p_ExperienceTD[ playerid ], 0.569999, 2.199999 ); - PlayerTextDrawColor( playerid, p_ExperienceTD[ playerid ], COLOR_GOLD ); - PlayerTextDrawSetOutline( playerid, p_ExperienceTD[ playerid ], 1 ); - PlayerTextDrawSetProportional( playerid, p_ExperienceTD[ playerid ], 1 ); - - p_ExperienceAwardTD[ playerid ] = CreatePlayerTextDraw( playerid, 338.000000, 149.000000, "+20 XP" ); - PlayerTextDrawAlignment( playerid, p_ExperienceAwardTD[ playerid ], 2 ); - PlayerTextDrawBackgroundColor( playerid, p_ExperienceAwardTD[ playerid ], 144 ); - PlayerTextDrawFont( playerid, p_ExperienceAwardTD[ playerid ], 3 ); - PlayerTextDrawLetterSize( playerid, p_ExperienceAwardTD[ playerid ], 0.409999, 1.600000 ); - PlayerTextDrawColor( playerid, p_ExperienceAwardTD[ playerid ], COLOR_GOLD ); - PlayerTextDrawSetOutline( playerid, p_ExperienceAwardTD[ playerid ], 1 ); - PlayerTextDrawSetProportional( playerid, p_ExperienceAwardTD[ playerid ], 1 ); - PlayerTextDrawSetSelectable( playerid, p_ExperienceAwardTD[ playerid ], 0 ); - - p_WantedLevelTD[ playerid ] = CreatePlayerTextDraw( playerid, 555.000000, 124.000000, "_" ); - PlayerTextDrawAlignment( playerid, p_WantedLevelTD[ playerid ], 2 ); - PlayerTextDrawBackgroundColor( playerid, p_WantedLevelTD[ playerid ], 255 ); - PlayerTextDrawFont( playerid, p_WantedLevelTD[ playerid ], 2 ); - PlayerTextDrawLetterSize( playerid, p_WantedLevelTD[ playerid ], 0.280000, 1.299999 ); - PlayerTextDrawColor( playerid, p_WantedLevelTD[ playerid ], -1872621313 ); - PlayerTextDrawSetOutline( playerid, p_WantedLevelTD[ playerid ], 1 ); - PlayerTextDrawSetProportional( playerid, p_WantedLevelTD[ playerid ], 1 ); - PlayerTextDrawSetSelectable( playerid, p_WantedLevelTD[ playerid ], 0 ); - - p_CoinsTD[ playerid ] = CreatePlayerTextDraw( playerid, 529.000000, 360.000000, "000000.0" ); - PlayerTextDrawBackgroundColor( playerid, p_CoinsTD[ playerid ], 255 ); - PlayerTextDrawFont( playerid, p_CoinsTD[ playerid ], 3 ); - PlayerTextDrawLetterSize( playerid, p_CoinsTD[ playerid ], 0.320000, 1.299998 ); - PlayerTextDrawColor( playerid, p_CoinsTD[ playerid ], COLOR_GOLD ); - PlayerTextDrawSetOutline( playerid, p_CoinsTD[ playerid ], 1 ); - PlayerTextDrawSetProportional( playerid, p_CoinsTD[ playerid ], 1 ); - - p_PlayerRankTD[ playerid ] = CreatePlayerTextDraw( playerid, 603.000000, 386.000000, "RANK" ); - PlayerTextDrawBackgroundColor( playerid, p_PlayerRankTD[ playerid ], 0 ); - PlayerTextDrawFont( playerid, p_PlayerRankTD[ playerid ], 5 ); - PlayerTextDrawLetterSize( playerid, p_PlayerRankTD[ playerid ], 0.519999, 4.000000 ); - PlayerTextDrawColor( playerid, p_PlayerRankTD[ playerid ], -1027424001 ); - PlayerTextDrawSetOutline( playerid, p_PlayerRankTD[ playerid ], 0 ); - PlayerTextDrawSetProportional( playerid, p_PlayerRankTD[ playerid ], 1 ); - PlayerTextDrawSetShadow( playerid, p_PlayerRankTD[ playerid ], 1 ); - PlayerTextDrawUseBox( playerid, p_PlayerRankTD[ playerid ], 1 ); - PlayerTextDrawBoxColor( playerid, p_PlayerRankTD[ playerid ], 0 ); - PlayerTextDrawTextSize( playerid, p_PlayerRankTD[ playerid ], 19.000000, 19.000000 ); - PlayerTextDrawSetPreviewModel( playerid, p_PlayerRankTD[ playerid ], 19782 ); - PlayerTextDrawSetPreviewRot( playerid, p_PlayerRankTD[ playerid ], 90.000000, 0.000000, 90.000000, 0.600000 ); - - p_PlayerRankTextTD[ playerid ] = CreatePlayerTextDraw( playerid, 529.000000, 386.000000, "Silver-1" ); - PlayerTextDrawBackgroundColor( playerid, p_PlayerRankTextTD[ playerid ], 255 ); - PlayerTextDrawFont( playerid, p_PlayerRankTextTD[ playerid ], 3 ); - PlayerTextDrawLetterSize( playerid, p_PlayerRankTextTD[ playerid ], 0.379999, 1.899999 ); - PlayerTextDrawColor( playerid, p_PlayerRankTextTD[ playerid ], -1027424001 ); - PlayerTextDrawSetOutline( playerid, p_PlayerRankTextTD[ playerid ], 1 ); - PlayerTextDrawSetProportional( playerid, p_PlayerRankTextTD[ playerid ], 1 ); - - p_RobberyRiskTD[ playerid ] = CreatePlayerTextDraw(playerid, 320.000000, 294.000000, "clerk feels very threatened"); - PlayerTextDrawAlignment(playerid, p_RobberyRiskTD[ playerid ], 2); - PlayerTextDrawBackgroundColor(playerid, p_RobberyRiskTD[ playerid ], 255); - PlayerTextDrawFont(playerid, p_RobberyRiskTD[ playerid ], 3); - PlayerTextDrawLetterSize(playerid, p_RobberyRiskTD[ playerid ], 0.200000, 0.900000); - PlayerTextDrawColor(playerid, p_RobberyRiskTD[ playerid ], -1); - PlayerTextDrawSetOutline(playerid, p_RobberyRiskTD[ playerid ], 1); - PlayerTextDrawSetProportional(playerid, p_RobberyRiskTD[ playerid ], 1); - PlayerTextDrawSetSelectable(playerid, p_RobberyRiskTD[ playerid ], 0); - - p_RobberyAmountTD[ playerid ] = CreatePlayerTextDraw(playerid, 320.000000, 280.000000, "Robbed ~g~~h~$1,800"); - PlayerTextDrawAlignment(playerid, p_RobberyAmountTD[ playerid ], 2); - PlayerTextDrawBackgroundColor(playerid, p_RobberyAmountTD[ playerid ], 255); - PlayerTextDrawFont(playerid, p_RobberyAmountTD[ playerid ], 3); - PlayerTextDrawLetterSize(playerid, p_RobberyAmountTD[ playerid ], 0.340000, 1.300000); - PlayerTextDrawColor(playerid, p_RobberyAmountTD[ playerid ], -1); - PlayerTextDrawSetOutline(playerid, p_RobberyAmountTD[ playerid ], 1); - PlayerTextDrawSetProportional(playerid, p_RobberyAmountTD[ playerid ], 1); - PlayerTextDrawSetSelectable(playerid, p_RobberyAmountTD[ playerid ], 0); - return 1; -} - stock SendClientMessageToGang( gangid, colour, format[ ], va_args<> ) // Conversion to foreach 14 stuffed the define, not sure how... { static @@ -28397,201 +27406,6 @@ function StartGateClose( gID ) { return MoveDynamicObject( g_gateData[ gID ] [ E_OBJECT ], g_gateData[ gID ] [ E_X ], g_gateData[ gID ] [ E_Y ], g_gateData[ gID ] [ E_Z ], g_gateData[ gID ] [ E_SPEED ], g_gateData[ gID ] [ E_RX ], g_gateData[ gID ] [ E_RY ], g_gateData[ gID ] [ E_RZ ] ), 1; } -stock CreatePaintballLobby( pid, playerid, const szLobbyName[ 16 ], iPlayerCap, iArena, Float: fHealth = 100.0, Float: fArmour = 100.0 ) -{ - if ( !Iter_Contains(paintball, pid) ) - { - format( g_paintballData[ pid ] [ E_NAME ], 16, "%s", szLobbyName ); - g_paintballData[ pid ] [ E_PASSWORD ] [ 0 ] = '\0'; - g_paintballData[ pid ] [ E_PASSWORDED ] = false; - g_paintballData[ pid ] [ E_HOST ] = playerid; - g_paintballData[ pid ] [ E_PLAYERS ] = 0; - g_paintballData[ pid ] [ E_LIMIT ] = iPlayerCap; - g_paintballData[ pid ] [ E_WEAPONS ] [ 0 ] = 0; - g_paintballData[ pid ] [ E_WEAPONS ] [ 1 ] = 0; - g_paintballData[ pid ] [ E_WEAPONS ] [ 2 ] = 0; - g_paintballData[ pid ] [ E_ARMOUR ] = fHealth; - g_paintballData[ pid ] [ E_HEALTH ] = fArmour; - g_paintballData[ pid ] [ E_ARENA ] = iArena; - g_paintballData[ pid ] [ E_ACTIVE ] = false; - g_paintballData[ pid ] [ E_REFILLER ] = false; - g_paintballData[ pid ] [ E_CD_TIMER ] = 0xFFFF; - Iter_Add(paintball, pid); - return true; - } - return false; -} - -stock DestroyPaintballArena( p ) -{ - if ( !Iter_Contains(paintball, p) ) - return false; - - Iter_Remove(paintball, p); - g_paintballData[ p ] [ E_HOST ] = INVALID_PLAYER_ID; - g_paintballData[ p ] [ E_PLAYERS ] = 0; - g_paintballData[ p ] [ E_ACTIVE ] = false; - g_paintballData[ p ] [ E_CD_TIMER ] = 0xFFFF; - return true; -} - -stock listPaintBallLobbies( playerid ) -{ - if ( p_WantedLevel[ playerid ] ) return SendError( playerid, "You mustn't be wanted to join a paintball arena." ); - if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "You must be a civilian to join a paintball arena." ); - - new - szLobbies[ 64 * MAX_PAINTBALL_ARENAS + 64 ]; - - for( new p = 0; p < MAX_PAINTBALL_ARENAS; p++ ) - { - if ( !g_paintballData[ p ] [ E_ACTIVE ] && !Iter_Contains(paintball, p) ) { - format( szLobbies, sizeof( szLobbies ), "%s{334D5C}Vacant Paintball Slot ($5,000)\n", szLobbies ); - } - else if ( Iter_Contains(paintball, p) ) { - format( szLobbies, sizeof( szLobbies ), "%s%s%s[%02d/%02d] %s hosted by %s\n", - szLobbies, g_paintballData[ p ] [ E_PASSWORDED ] ? ( "{DF4949}" ) : ( "{53B240}" ), g_paintballData[ p ] [ E_ACTIVE ] ? ( "" ) : ( "{EFC94C}" ), g_paintballData[ p ] [ E_PLAYERS ], g_paintballData[ p ] [ E_LIMIT ], g_paintballData[ p ] [ E_NAME ], ReturnPlayerName( g_paintballData[ p ] [ E_HOST ] ) - ); - } - } - return ShowPlayerDialog( playerid, DIALOG_PAINTBALL, DIALOG_STYLE_LIST, "{FFFFFF}Paintball - Selection", szLobbies, "Select", "Cancel" ); -} - -stock showPaintBallLobbyData( playerid, id, second_button[ ] = "Join Game" ) -{ - format( szLargeString, sizeof( szLargeString ), "Lobby Name\t\t"COL_GREY"%s"COL_WHITE"\nLobby Password\t%s"COL_WHITE"\nPlayer Capacity\t\t"COL_GREY"%d"COL_WHITE"\nHealth\t\t\t"COL_GREY"%0.2f%%"COL_WHITE"\nArmour\t\t\t"COL_GREY"%0.2f%%"COL_WHITE"\nRefill Health/Armour\t%s"COL_WHITE"\nArena\t\t\t"COL_GREY"%s"COL_WHITE"\nPrimary Weapon\t"COL_GREY"%s"COL_WHITE"\nSecondary Weapon\t"COL_GREY"%s"COL_WHITE"\nTertiary Weapon\t"COL_GREY"%s", - g_paintballData[ id ] [ E_NAME ], g_paintballData[ id ] [ E_PASSWORDED ] == true ? ( ""COL_GREEN"ENABLED" ) : ( ""COL_RED"DISABLED" ), g_paintballData[ id ] [ E_LIMIT ], g_paintballData[ id ] [ E_HEALTH ], g_paintballData[ id ] [ E_ARMOUR ], g_paintballData[ id ] [ E_REFILLER ] == true ? ( ""COL_GREEN"ENABLED" ) : ( ""COL_RED"DISABLED" ), g_paintballArenaData[ g_paintballData[ id ] [ E_ARENA ] ] [ E_NAME ], - ReturnWeaponName( g_paintballData[ id ] [ E_WEAPONS ] [ 0 ] ), ReturnWeaponName( g_paintballData[ id ] [ E_WEAPONS ] [ 1 ] ), ReturnWeaponName( g_paintballData[ id ] [ E_WEAPONS ] [ 2 ] ) - ); - ShowPlayerDialog( playerid, DIALOG_PAINTBALL_EDIT, DIALOG_STYLE_LIST, "{FFFFFF}Paintball - Lobby Settings", szLargeString, "Change", second_button ); -} - -stock ShowPlayerPaintballArenas( playerid ) -{ - static - szArenas[ 16 * sizeof( g_paintballArenaData ) ]; - - if ( szArenas[ 0 ] == '\0' ) - { - for( new i; i < sizeof( g_paintballArenaData ); i++ ) - { - strcat( szArenas, g_paintballArenaData[ i ] [ E_NAME ] ); - strcat( szArenas, "\n" ); - } - } - - ShowPlayerDialog( playerid, DIALOG_PAINTBALL_ARENAS, DIALOG_STYLE_LIST, "{FFFFFF}Paintball - Edit", szArenas, "Select", "Back" ); -} - -stock JoinPlayerPaintball( playerid, p ) -{ - if ( !IsPlayerConnected( playerid ) ) - return -1; - - if ( !Iter_Contains( paintball, p ) ) - return -1; - - if ( g_paintballData[ p ] [ E_PLAYERS ] >= g_paintballData[ p ] [ E_LIMIT ] ) - return SendError( playerid, "This lobby is currently full, you're unable to join it." ); - - p_PaintBallArena { playerid } = p; - p_inPaintBall { playerid } = true; - g_paintballData [ p ] [ E_PLAYERS ] ++; - - SpawnToPaintball( playerid, p ); - SendClientMessageFormatted( playerid, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" You've joined the paintball area: "COL_GREY"%s"COL_WHITE".", g_paintballData[ p ] [ E_NAME ] ); - return 1; -} - -stock SpawnToPaintball( playerid, p ) -{ - if ( !IsPlayerConnected( playerid ) ) - return; - - if ( !Iter_Contains( paintball, p ) ) - return; - - new - iArena = g_paintballData[ p ] [ E_ARENA ]; - - ResetPlayerWeapons( playerid ); - - GivePlayerWeapon( playerid, g_paintballData[ p ] [ E_WEAPONS ] [ 0 ], 16000 ); - GivePlayerWeapon( playerid, g_paintballData[ p ] [ E_WEAPONS ] [ 1 ], 16000 ); - GivePlayerWeapon( playerid, g_paintballData[ p ] [ E_WEAPONS ] [ 2 ], 16000 ); - - SetPlayerHealth( playerid, g_paintballData[ p ] [ E_HEALTH ] ); - SetPlayerArmour( playerid, g_paintballData[ p ] [ E_ARMOUR ] ); - - SetPlayerPos( playerid, g_paintballArenaData[ iArena ] [ E_X ], g_paintballArenaData[ iArena ] [ E_Y ], g_paintballArenaData[ iArena ] [ E_Z ] ); - SetPlayerInterior( playerid, g_paintballArenaData[ iArena ] [ E_INTERIOR ] ); - SetPlayerVirtualWorld( playerid, p + 10000 ); -} - -stock LeavePlayerPaintball( playerid ) -{ - if ( !IsPlayerConnected( playerid ) ) - return; - - new - p = -1; - - if ( !hasPaintBallArena( playerid, p ) ) - p = p_PaintBallArena{ playerid }; // Backup - - if ( IsPlayerInPaintBall( playerid ) ) - { - p_inPaintBall { playerid } = false; - p_LeftPaintball { playerid } = true; - g_paintballData [ p ] [ E_PLAYERS ] --; - } - - if ( !Iter_Contains( paintball, p ) ) - return; - - if ( g_paintballData[ p ] [ E_HOST ] == playerid ) - { - new - oldHost = g_paintballData[ p ] [ E_HOST ]; - - foreach(new i : Player) - { - if ( IsPlayerInPaintBall( i ) && p_PaintBallArena{ i } == p && playerid != i ) - { - g_paintballData[ p ] [ E_HOST ] = i; - SendClientMessageFormatted( i, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" %s(%d) is now the leader of the lobby.", ReturnPlayerName( i ), i ); - break; - } - } - - if ( oldHost == g_paintballData[ p ] [ E_HOST ] ) - { - SendClientMessage( playerid, -1, ""COL_GREY"[PAINTBALL]"COL_WHITE" There is no one playing in your lobby therefore the game has been destroyed." ); - DestroyPaintballArena( p ); - } - } -} - -stock respawnAllInPaintballLobby( lobby ) -{ - foreach(new i : Player) - { - if ( IsPlayerInPaintBall( i ) && p_PaintBallArena{ i } == lobby && GetPlayerState( i ) != PLAYER_STATE_WASTED && IsPlayerSpawned( i ) ) - SpawnPlayer( i ), SendServerMessage( i, "As the lobby host changed some settings, you've been spawned." ); - } -} - -stock hasPaintBallArena( playerid, &arena = -1 ) -{ - foreach(new i : paintball) { - if ( g_paintballData[ i ] [ E_HOST ] == playerid ) { - arena = i; - return true; - } - } - return false; -} - stock hasBadDrivebyWeapon( playerid ) { for( new i; i < sizeof g_BannedDrivebyWeapons; i++ )