09.01.2017, 13:44
Hello there friends.
I have a little ( or big idk ) problem on my server.
Well my nickname in SA:MP is FaLLenGirL.
So if i enter on server with nickname: fallengirl ( writed like this not FaLLenGirL ) with lowercase, do not say to me to register (because fallengirl is another name on server but with lowercase ). It's saying that is the same account like I write FaLLenGirL letters big and small. ( it's says that FaLLenGirL = fallengirl ) no matter how i write the name if it
contains the same letters but wirted different it says that is the same.
If i enter with fALLENgirl it's the same. No matter how i write the name it says that the Account = with FaLLenGirL,
and if i enter with fallengirl, fALLENgirl, FaLLENGIRL, fALLENGIRL, Fallengirl no matter how i write it, in dialog says that the account is registered, and if i type the password from " FaLLenGirL " account it's logging me in and the dates from
table "Accounts" it's transfered on fallengirl, fALLENgirl, FaLLENGIRL, fALLENGIRL, Fallengirl ( no matter what name i join the server if contains the same letters ). :\
** This problem isn't just for account "FaLLenGirL" it is for all Accounts. If i change my name in [.IS.]FaLLenGirL, yes now it says that isn't registered because i added an " [.IS.] " in the name and that letters are not the same with "FaLLenGirL" simple. But if i recconect after i registered with " [.IS.]FaLLenGirL", so if i reconnect with [.is.]fallengirl it says that the account is registered and if i type in the login box the password from " [.IS.]FaLLenGirL" it's logging me in with the dates from " [.IS.]FaLLenGirL" account.
1. When i enter with the good name: "FaLLenGirL": ( picture )
![](http://i63.tinypic.com/1zns7sp.png)
2. When i write the password for account: "FaLLenGirL"
![](http://i66.tinypic.com/kesnc0.png)
3. When i recconect or connect with name: "fallengirl" with lowercase.
![](http://i63.tinypic.com/maj51f.png)
4. When i write the same password like account: "FaLLenGirL" with big and small letters.
![](http://i64.tinypic.com/2nkjt01.png)
5. When i loggin in with that name: "fallengirl" and with the password from "FaLLenGirL"
![](http://i64.tinypic.com/4ghws6.png)
My includes from Gamemode are:
My Plugins are: ( photo in plugins folder )
![](http://i63.tinypic.com/2dw5lyr.png)
SERVER.CFG: ( Plugins and others )
![](http://i67.tinypic.com/am3z95.png)
The syntaxes from " OnPlayerConnect "
PlayerName stock:
AccountLoad function:
DIALOG_LOGIN:
DIALOG_REGISTER:
LoadPlayerData( appears in DIALOG_LOGIN ):
LoginAccount ( appears in LoadPlayerData ):
LoginPlayerInfo:
OnAccountCreated:
That's all PLEASE, help me with this.
Please respond to this topic, i gave all the details.. if someone knows pawno, scripting better than i do
PLEASE don't hesitate to help me. For more details reply. Thanks guys.
I have a little ( or big idk ) problem on my server.
Well my nickname in SA:MP is FaLLenGirL.
So if i enter on server with nickname: fallengirl ( writed like this not FaLLenGirL ) with lowercase, do not say to me to register (because fallengirl is another name on server but with lowercase ). It's saying that is the same account like I write FaLLenGirL letters big and small. ( it's says that FaLLenGirL = fallengirl ) no matter how i write the name if it
contains the same letters but wirted different it says that is the same.
If i enter with fALLENgirl it's the same. No matter how i write the name it says that the Account = with FaLLenGirL,
and if i enter with fallengirl, fALLENgirl, FaLLENGIRL, fALLENGIRL, Fallengirl no matter how i write it, in dialog says that the account is registered, and if i type the password from " FaLLenGirL " account it's logging me in and the dates from
table "Accounts" it's transfered on fallengirl, fALLENgirl, FaLLENGIRL, fALLENGIRL, Fallengirl ( no matter what name i join the server if contains the same letters ). :\
** This problem isn't just for account "FaLLenGirL" it is for all Accounts. If i change my name in [.IS.]FaLLenGirL, yes now it says that isn't registered because i added an " [.IS.] " in the name and that letters are not the same with "FaLLenGirL" simple. But if i recconect after i registered with " [.IS.]FaLLenGirL", so if i reconnect with [.is.]fallengirl it says that the account is registered and if i type in the login box the password from " [.IS.]FaLLenGirL" it's logging me in with the dates from " [.IS.]FaLLenGirL" account.
1. When i enter with the good name: "FaLLenGirL": ( picture )
![](http://i63.tinypic.com/1zns7sp.png)
2. When i write the password for account: "FaLLenGirL"
![](http://i66.tinypic.com/kesnc0.png)
3. When i recconect or connect with name: "fallengirl" with lowercase.
![](http://i63.tinypic.com/maj51f.png)
4. When i write the same password like account: "FaLLenGirL" with big and small letters.
![](http://i64.tinypic.com/2nkjt01.png)
5. When i loggin in with that name: "fallengirl" and with the password from "FaLLenGirL"
![](http://i64.tinypic.com/4ghws6.png)
My includes from Gamemode are:
Код:
#if defined FG ===================================================== **************** INFINITE STUNTAGE ***************** ********** made by: FaLLenGirL 2013 - 2016 ********* ===================================================== #endif /* Includes */ #include "a_samp" #undef MAX_PLAYERS #define MAX_PLAYERS 50 #define MAX_INI_ENTRY_TEXT 130 #undef MAX_PLAYER_NAME #define MAX_PLAYER_NAME 24 #define FOREACH_NO_BOTS #include "foreach" #include "regex" #include "a_mysql" #include "foreach" #include "sscanf2" #include "streamer" #include "fuckcleo" #include "floodcontrol" #include "zcmd" #include "mSelection" #include "YSI\y_iterate" #include "dini" #include "crashdetect" #pragma dynamic 46500 #pragma tabsize 0
![](http://i63.tinypic.com/2dw5lyr.png)
SERVER.CFG: ( Plugins and others )
![](http://i67.tinypic.com/am3z95.png)
The syntaxes from " OnPlayerConnect "
Код:
mysql_format( DB_Connect, query, sizeof( query ), "SELECT * FROM `Accounts` WHERE `Name` = '%s'", PlayerName( playerid ) ); mysql_tquery( DB_Connect, query, "AccountLoad", "i", playerid );
Код:
stock PlayerName( playerid ) { new name[ MAX_PLAYER_NAME ]; GetPlayerName( playerid, name, MAX_PLAYER_NAME ); return name; }
AccountLoad function:
Код:
function AccountLoad( playerid ) { new Rows, Fields; cache_get_data( Rows, Fields, DB_Connect ); if( Rows ) { format( eString, 1024, "{FFFFFF}Welcome back {%06x}%s(%d) {FFFFFF}on {FF0000}:: {FFFFFF}Infinite Stuntage\n\ {FFFFFF}To login type your password in the box bellow.\n\n\ {C0C0C0}[INFO]:\n\ {FFFFFF}If you want to change your name press: {C0C0C0}New Name{FFFFFF}.", GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Login:", eString, "Login", "New Name" ); return 1; } format( eString, sizeof( eString ), "{FFFFFF}Welcome {%06x}%s(%d) {FFFFFF}on {FF0000}:: {FFFFFF}Infinite Stuntage !\n\n", GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); strcat( eString, "{FFFFFF}This account is not registered on our server.\n" ); strcat( eString, "{FFFFFF}To login type a password in the box bellow.\n" ); strcat( eString, "{FFFFFF}Your statistics will be saved in the database after register.\n\n" ); strcat( eString, "{C0C0C0}[INFO]:\n" ); strcat( eString, "{FFFFFF}- Your password must contain at least: {FF0000}6 {FFFFFF}characters.\n" ); strcat( eString, "{FFFFFF}- Take care to remeber your {C0C0C0}password {FFFFFF}to login !" ); ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FFFFFF}Register:", eString, "Register", ""); return 1; }
Код:
case DIALOG_LOGIN: { if( !response ) return ShowPlayerDialog(playerid, DIALOG_NEWNICK, DIALOG_STYLE_INPUT, "{FFFFFF}New Name:", "{FFFFFF}Please enter in the box bellow your new name\n{FFFFFF}The name must have at least: {FF0000}6 {FFFFFF}characters:", "Next", "Quit" ); new lPassword[ 25 ], Query[ 512 ]; eString[ 0 ] = EOS; if( sscanf( inputtext, "s[25]", lPassword ) ) { format( eString, 1024, "{FFFFFF}Welcome back {%06x}%s(%d) {FFFFFF}on {FF0000}:: {FFFFFF}ISF - Server !\n\ {FFFFFF}To login type your password in the box bellow.\n\n\ {C0C0C0}[INFO]:\n\ {FFFFFF}If you want to change your name press: {C0C0C0}New Name{FFFFFF}.", GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Login:", eString, "Login", "New Name" ); } if( strlen( inputtext ) < 3 || strlen( inputtext ) > 24 ) return ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Login: {FF0000}characters error{FFFFFF}:", "{FFFFFF}Please enter in the box bellow your password.\n{FFFFFF}This password must have at least: {FF0000}6 {FFFFFF}characters:", "Login", "New Name"); if( strfind( inputtext, "'", true ) != -1 ) return ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Login: {FF0000}invalid characters{FFFFFF}:", "{FFFFFF}Please enter in the box bellow your password.\n{FF0000}ATTENTION: {FFFFFF}You can't use this (') in your password:", "Login", "New Name" ); else { mysql_real_escape_string( inputtext, lPassword, DB_Connect ); mysql_format( DB_Connect, Query, sizeof( Query ), "SELECT * FROM `Accounts` WHERE `Name` = '%s' AND `Password` = '%s'", PlayerName( playerid ), lPassword ); mysql_tquery( DB_Connect, Query, "LoadPlayerData", "is", playerid, PlayerName( playerid ) ); } return 1; }
Код:
case DIALOG_REGISTER: { new rPassword[ 24 ], liYear, liMonth, liDay, rQuery[ 8090 ]; if( !response ) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FFFFFF}Register: {FF0000}error{FFFFFF}:", "{FFFFFF}If you want to continue, please register !\nType your desired password in the box bellow:", "Register", ""); if( sscanf( inputtext, "s[24]", rPassword ) ) return ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FFFFFF}Register: {FF0000}length error{FFFFFF}:", "{FFFFFF}If you want to continue, please register !\n{FFFFFF}Your password must contain at least: {FF0000}6 {FFFFFF}charactes\n{FFFFFF}Type your desired password in the box bellow:", "Register", ""); if( strlen( rPassword ) < 6 || strlen( rPassword ) > 24 ) return ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FFFFFF}Register: {FF0000}length error{FFFFFF}:", "{FFFFFF}If you want to continue, please register !\n{FFFFFF}Your password must contain at least: {FF0000}6 {FFFFFF}charactes\n{FFFFFF}Type your desired password in the box bellow:", "Register", ""); if( strfind( rPassword, "'", true ) != -1 ) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{FFFFFF}Register: {FF0000}invalid characters{FFFFFF}:", "Please enter your password in the box bellow.\n{FF0000}ATTENTION: {FFFFFF}You can't use this (') in your password:", "Register", ""); mysql_real_escape_string( rPassword, rPassword ); getdate( liYear, liMonth, liDay ); PlayerInfo[ playerid ][ LoggedIn ] = 1, ResetPlayerMoney( playerid ), GivePlayerMoney( playerid, 25000 ), SetPlayerScore( playerid, 100 ); PlayerInfo[ playerid ][ Registered ] = 1; //------------------------------------------------------------------ //INSERT INTO ACCOUNT //------------------------------------------------------------------ mysql_format( DB_Connect, rQuery, 8090, "INSERT INTO `Accounts` (`ID`, `Name`, `Password`, `IP`, `LoggedIn`, `RegisterDate`, `LastOn`, `Level`, `VIP`, `Cash`, `Score`, `Headshots`, `Kills`, `Deaths`, `Hours`, `Minutes`, `Seconds`, `BestKillings`, `KillingSpree`, `FavSkin`, `UseSkin`, `Property`, `Positive`, `Negative`,\ `Kicks`, `Bans`, `Jails`, `Warns`, `ClearChats`, `ReactionTest`, `MathTest`, `Mutes`, `Jailed`, `JailTime`, `Frozen`, `FreezeTime`, `Muted`, `MuteTime`, `RaceScore`, `DriftScore`, `GangID`, `GangRank`, `GangSkin`, `GangKills`, `GangDeaths`, `GangWarns`, `GangCaptures`, `GangPoints`,\ `Ignores`, `C4`, `StatsNote`, `KickW`, `FalloutWon`, `MazeWon`, `GiftsWon`, `AntiFall`, `FlyMode`, `RainbowMode`, `God`, `GodCar`, `Boost`, `VipGodCar`, `VipGod`, `UnJails`, `UnMutes`, `Gotos`, `Asays`, `Gets`, `Armours`, `Heals`, `Racs`, `PosGotos`, `Disarms`, `Explodes`,\ `Burns`, `Spawns`, `Freezes`, `Akills`, `UnFreezes`, `WriteColor`, `DerbyWon`, `GangC4Planted`, `GangC4Blowed`, `PlayerC4Blowed`, `PlayerC4Planted`, `GateRepairs`, `GateBlows`, `GateOpens`, `GateCloses`)" ); mysql_format( DB_Connect, rQuery, 8090, "%s VALUES ('0', '%s', '%s', '%s', '1', '%02d/%02d/%02d', '%02d/%02d/%02d', '0', '0', '25000', '100', '0', '0', '0', '0', '0', '0', '0', '0', '217', '1', '0', '0', '0', \ '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0/0/0/0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', \ '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0')", rQuery, PlayerName( playerid ), rPassword, GetPlayerIPEx( playerid ), liDay, liMonth, liYear, liDay, liMonth, liYear ); mysql_tquery( DB_Connect, rQuery, "OnAccountCreated", "i", playerid ); //------------------------------------------------------------------ eBigString[ 0 ] = EOS; format( eBigString, 5000, "{FFFFFF}Thank you for registering on this server {%06x}%s(%d) {FFFFFF}!\n\n", GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); format( eBigString, 5000, "%s{FFFF00}Why to play on this server:\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- We have friendly administrators than can help you everytime !\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- We have lots of stunts, deathmatches, relax zones, party zones etc.\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- Also we have a Gang System, and you can capture and fight with another gangs !\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- You can buy your private car, house, property and much more !\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- We have also lots of systems and you can get a job or to create a party !\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- You can play with our server minigames or others anims for your hapiness.\n\n", eBigString ); format( eBigString, 5000, "%s{FFFF00}Join and Register our Comunity:\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- If you want to know more things about us join: www.pro-gaming.ro.\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- Take your friends on our Comunity and join our servers.\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- There you can aplicate for Admin or V.I.P or you can donate.\n\n", eBigString ); format( eBigString, 5000, "%s{C0C0C0}[INFO]:\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- Your account register password is: {FFFFFF}'{FF0000}%s{FFFFFF}'.\n", eBigString, rPassword ); format( eBigString, 5000, "%s{FFFFFF}- Try to not forget your password account, may you take a screenshot.\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- You received from server administrators: {FFFFFF}'{00CC00}${FF0000}25,000{FFFFFF}' and \ '{FF0000}100{FFFFFF}' Score.\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- For others statistics use: {C0C0C0}/stats{FFFFFF}, {C0C0C0}/astats{FFFFFF}, \ {C0C0C0}/serverstats{FFFFFF}, {C0C0C0}/gstats{FFFFFF}.\n", eBigString ); format( eBigString, 5000, "%s{FFFFFF}- For help you can use by yourself: {C0C0C0}'/howto' {FFFFFF}or {C0C0C0}'/help{FFFFFF}.", eBigString ); ShowPlayerDialog( playerid, EMPTY_DIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}About: {FF0000}Infinite Stuntage{FFFFFF}:", eBigString, "Close", "" ); return 1; } }
Код:
function LoadPlayerData( playerid, q_acc[ ] ) { new Date[ 6 ], query[ 900 ], q_rows, q_fields; getdate( Date[ 0 ], Date[ 1 ], Date[ 2 ] ); gettime( Date[ 3 ], Date[ 4 ], Date[ 5 ] ); eString[ 0 ] = EOS; cache_get_data( q_rows, q_fields, DB_Connect ); if( !q_rows ) { PlayerInfo[ playerid ][ FailLogin ] ++; if( PlayerInfo[ playerid ][ FailLogin ] >= ServerInfo[ MaxWarnings ] ) { format( eString, sizeof( eString ), "[SV INFO]: {%06x}%s(%d) {C0C0C0}has been kicked by {FF0000}Server{C0C0C0}. Reason: Failed Logins.", GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); SendClientMessageToAll( 0xC0C0C0FF, eString ); TogglePlayerControllable( playerid, false ); format( eString, sizeof( eString ), "{FF0000}You have been kicked !\n\n{FFFFFF}Nickname: {00CC00}%s\n\n{FFFFFF}IP: {C0C0C0}%s\n\n{FFFFFF}Kicked by: {FF0000}Server\n\n{FFFFFF}Reason: {00CC00}Failed Logins\n\n\ {FFFFFF}Kick Date: {00CC00}%d/%d/%d\n\n{FFFFFF}Kick Time: {00CC00}%d/%d/%d", PlayerName( playerid ), GetPlayerIPEx( playerid ), Date[ 0 ], Date[ 1 ], Date[ 2 ], Date[ 3 ], Date[ 4 ], Date[ 5 ] ); ShowPlayerDialog( playerid, EMPTY_DIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}Kick Details:", eString, "OK", ""); eLog[ 0 ] = EOS; format( eLog, sizeof( eLog ), "%s has been kicked. Reason: Failed Logins.", PlayerName( playerid ) ), SendLog( eLog ), KickEx( playerid ); } else { format( eString, sizeof( eString ), "{FFFFFF}This password is incorrect. ( {FF0000}%d/%d {FFFFFF}Warnings Remaining ).\n\ {FFFFFF}Type your {00CC00}correct {FFFFFF}password in the box bellow.\n\n\ {C0C0C0}[INFO]:\n\ {FFFFFF}- If you don't remember your password press: {C0C0C0}New Name.\n\ {FFFFFF}- To recover your old password visit: {C0C0C0}www.pro-gaming.ro.", PlayerInfo[ playerid ][ FailLogin ], ServerInfo[ MaxWarnings ] ); ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Login: {FF0000}failed", eString, "Login", "New Name" ); } } else { mysql_format( DB_Connect, query, sizeof( query ), "SELECT * FROM `Accounts` WHERE `Name` = '%s'", PlayerName( playerid ) ); mysql_tquery( DB_Connect, query, "LoginAccount", "i", playerid ); } return 1; }
Код:
function LoginAccount( playerid ) { new String[ 4 ][ 128 ], query[ 2000 ]; eString[ 0 ] = EOS; PlayerInfo[ playerid ][ AccID ] = cache_get_field_content_int( 0, "ID", DB_Connect ); PlayerInfo[ playerid ][ Level ] = cache_get_field_content_int( 0, "Level", DB_Connect ); PlayerInfo[ playerid ][ Write_Color ] = cache_get_field_content_int( 0, "WriteColor", DB_Connect ); PlayerInfo[ playerid ][ pVIP ] = cache_get_field_content_int( 0, "VIP", DB_Connect ); PlayerInfo[ playerid ][ Headshots ] = cache_get_field_content_int( 0, "Headshots", DB_Connect ); PlayerInfo[ playerid ][ Kills ] = cache_get_field_content_int( 0, "Kills", DB_Connect ); PlayerInfo[ playerid ][ Deaths ] = cache_get_field_content_int( 0, "Deaths", DB_Connect ); PlayerInfo[ playerid ][ hours ] = cache_get_field_content_int( 0, "Hours", DB_Connect ); PlayerInfo[ playerid ][ mins ] = cache_get_field_content_int( 0, "Minutes", DB_Connect ); PlayerInfo[ playerid ][ secs ] = cache_get_field_content_int( 0, "Seconds", DB_Connect ); PlayerInfo[ playerid ][ KillingSpree ] = cache_get_field_content_int( 0, "KillingSpree", DB_Connect ); PlayerInfo[ playerid ][ BestKillingSpree ] = cache_get_field_content_int( 0, "BestKillings", DB_Connect ); PlayerInfo[ playerid ][ FavSkin ] = cache_get_field_content_int( 0, "FavSkin", DB_Connect ); PlayerInfo[ playerid ][ UseSkin ] = cache_get_field_content_int( 0, "UseSkin", DB_Connect ); PlayerInfo[ playerid ][ Property ] = cache_get_field_content_int( 0, "Property", DB_Connect ); PlayerInfo[ playerid ][ PosRespect ] = cache_get_field_content_int( 0, "Positive", DB_Connect ); PlayerInfo[ playerid ][ NegRespect ] = cache_get_field_content_int( 0, "Negative", DB_Connect ); PlayerInfo[ playerid ][ PBans ] = cache_get_field_content_int( 0, "Bans", DB_Connect ); PlayerInfo[ playerid ][ PKicks ] = cache_get_field_content_int( 0, "Kicks", DB_Connect ); PlayerInfo[ playerid ][ PWarns ] = cache_get_field_content_int( 0, "Warns", DB_Connect ); PlayerInfo[ playerid ][ PJails ] = cache_get_field_content_int( 0, "Jails", DB_Connect ); PlayerInfo[ playerid ][ PUnJails ] = cache_get_field_content_int( 0, "UnJails", DB_Connect ); PlayerInfo[ playerid ][ PMutes ] = cache_get_field_content_int( 0, "Mutes", DB_Connect ); PlayerInfo[ playerid ][ PUnMutes ] = cache_get_field_content_int( 0, "UnMutes", DB_Connect ); PlayerInfo[ playerid ][ PClearCH ] = cache_get_field_content_int( 0, "ClearChats", DB_Connect ); PlayerInfo[ playerid ][ PGotos ] = cache_get_field_content_int( 0, "Gotos", DB_Connect ); PlayerInfo[ playerid ][ PAsays ] = cache_get_field_content_int( 0, "Asays", DB_Connect ); PlayerInfo[ playerid ][ PGets ] = cache_get_field_content_int( 0, "Gets", DB_Connect ); PlayerInfo[ playerid ][ PArmour ] = cache_get_field_content_int( 0, "Armours", DB_Connect ); PlayerInfo[ playerid ][ PHeal ] = cache_get_field_content_int( 0, "Heals", DB_Connect ); PlayerInfo[ playerid ][ PRac ] = cache_get_field_content_int( 0, "Racs", DB_Connect ); PlayerInfo[ playerid ][ PPosGoto ] = cache_get_field_content_int( 0, "PosGotos", DB_Connect ); PlayerInfo[ playerid ][ PDisarms ] = cache_get_field_content_int( 0, "Disarms", DB_Connect ); PlayerInfo[ playerid ][ PExplodes ] = cache_get_field_content_int( 0, "Explodes", DB_Connect ); PlayerInfo[ playerid ][ PBurns ] = cache_get_field_content_int( 0, "Burns", DB_Connect ); PlayerInfo[ playerid ][ PSpawns ] = cache_get_field_content_int( 0, "Spawns", DB_Connect ); PlayerInfo[ playerid ][ PFreezes ] = cache_get_field_content_int( 0, "Freezes", DB_Connect ); PlayerInfo[ playerid ][ PAkill ] = cache_get_field_content_int( 0, "Akills", DB_Connect ); PlayerInfo[ playerid ][ PUnFreezes ] = cache_get_field_content_int( 0, "UnFreezes", DB_Connect ); PlayerInfo[ playerid ][ PReactions ] = cache_get_field_content_int( 0, "ReactionTest", DB_Connect ); PlayerInfo[ playerid ][ PMaths ] = cache_get_field_content_int( 0, "MathTest", DB_Connect ); PlayerInfo[ playerid ][ Jailed ] = cache_get_field_content_int( 0, "Jailed", DB_Connect ); PlayerInfo[ playerid ][ Muted ] = cache_get_field_content_int( 0, "Muted", DB_Connect ); PlayerInfo[ playerid ][ Frozen ] = cache_get_field_content_int( 0, "Frozen", DB_Connect ); PlayerInfo[ playerid ][ RacePoints ] = cache_get_field_content_int( 0, "RaceScore", DB_Connect ); PlayerInfo[ playerid ][ DriftPoints ] = cache_get_field_content_int( 0, "DriftScore", DB_Connect ); PlayerInfo[ playerid ][ GangID ] = cache_get_field_content_int( 0, "GangID", DB_Connect ); PlayerInfo[ playerid ][ g_Kills ] = cache_get_field_content_int( 0, "GangKills", DB_Connect ); PlayerInfo[ playerid ][ g_Deaths ] = cache_get_field_content_int( 0, "GangDeaths", DB_Connect ); PlayerInfo[ playerid ][ g_Rank ] = cache_get_field_content_int( 0, "GangRank", DB_Connect ); PlayerInfo[ playerid ][ g_Skin ] = cache_get_field_content_int( 0, "GangSkin", DB_Connect ); PlayerInfo[ playerid ][ g_Warns ] = cache_get_field_content_int( 0, "GangWarns", DB_Connect ); PlayerInfo[ playerid ][ g_Captures ] = cache_get_field_content_int( 0, "GangCaptures", DB_Connect ); PlayerInfo[ playerid ][ g_Points ] = cache_get_field_content_int( 0, "GangPoints", DB_Connect ); PlayerInfo[ playerid ][ C4 ] = cache_get_field_content_int( 0, "C4", DB_Connect ); PlayerInfo[ playerid ][ GangRepairs ] = cache_get_field_content_int( 0, "GateRepairs", DB_Connect ); PlayerInfo[ playerid ][ GateOpens ] = cache_get_field_content_int( 0, "GateOpens", DB_Connect ); PlayerInfo[ playerid ][ GateCloses ] = cache_get_field_content_int( 0, "GateCloses", DB_Connect ); PlayerInfo[ playerid ][ GangBlows ] = cache_get_field_content_int( 0, "GateBlows", DB_Connect ); PlayerInfo[ playerid ][ GangC4Planted ] = cache_get_field_content_int( 0, "GangC4Planted", DB_Connect ); PlayerInfo[ playerid ][ GangC4Blowed ] = cache_get_field_content_int( 0, "GangC4Blowed", DB_Connect ); PlayerInfo[ playerid ][ PlayerC4Planted ] = cache_get_field_content_int( 0, "PlayerC4Planted", DB_Connect ); PlayerInfo[ playerid ][ PlayerC4Blowed ] = cache_get_field_content_int( 0, "PlayerC4Blowed", DB_Connect ); PlayerInfo[ playerid ][ KickW ] = cache_get_field_content_int( 0, "KickW", DB_Connect ); PlayerInfo[ playerid ][ P_AntiFall ] = cache_get_field_content_int( 0, "AntiFall", DB_Connect ); PlayerInfo[ playerid ][ Vup ] = cache_get_field_content_int( 0, "FlyMode", DB_Connect ); PlayerInfo[ playerid ][ Rainbow_Car ] = cache_get_field_content_int( 0, "RainbowMode", DB_Connect ); PlayerInfo[ playerid ][ God ] = cache_get_field_content_int( 0, "God", DB_Connect ); PlayerInfo[ playerid ][ CarGod ] = cache_get_field_content_int( 0, "GodCar", DB_Connect ); PlayerInfo[ playerid ][ Boost ] = cache_get_field_content_int( 0, "Boost", DB_Connect ); PlayerInfo[ playerid ][ VGodCar ] = cache_get_field_content_int( 0, "VipGodCar", DB_Connect ); PlayerInfo[ playerid ][ VGod ] = cache_get_field_content_int( 0, "VipGod", DB_Connect ); PlayerInfo[ playerid ][ Falloutwon ] = cache_get_field_content_int( 0, "FalloutWon", DB_Connect ); PlayerInfo[ playerid ][ Derbywon ] = cache_get_field_content_int( 0, "DerbyWon", DB_Connect ); PlayerInfo[ playerid ][ Mazewon ] = cache_get_field_content_int( 0, "MazeWon", DB_Connect ); PlayerInfo[ playerid ][ Giftswon ] = cache_get_field_content_int( 0, "GiftsWon", DB_Connect ); PlayerInfo[ playerid ][ LoggedIn ] = 1; PlayerInfo[ playerid ][ Registered ] = 1; ResetPlayerMoney( playerid ); GivePlayerMoney( playerid, cache_get_field_content_int( 0, "Cash", DB_Connect ) ); SetPlayerScore( playerid, cache_get_field_content_int( 0, "Score", DB_Connect ) ); cache_get_field_content( 0, "LastOn", PlayerInfo[ playerid ][ LastOn ] , DB_Connect, 129 ); cache_get_field_content( 0, "RegisterDate", PlayerInfo[ playerid ][ RegDate ], DB_Connect, 129 ); cache_get_field_content( 0, "Ignores", String[ 3 ], DB_Connect ); sscanf( String[ 3 ], "p</>iiii", PlayerInfo[ playerid ][ Ignore_PM ], PlayerInfo[ playerid ][ Ignore_Goto ], PlayerInfo[ playerid ][ Ignore_Get ], PlayerInfo[ playerid ][ Ignore_Spec ] ); if( PlayerInfo[ playerid ][ Jailed ] == 1 ) { cache_get_field_content( 0, "JailTime", String[ 0 ], DB_Connect ); sscanf( String[ 0 ], "p<:>ii", gTime[ playerid ][ 0 ], gTime[ playerid ][ 1 ] ); } if( PlayerInfo[ playerid ][ Muted ] == 1 ) { cache_get_field_content( 0, "MuteTime", String[ 1 ], DB_Connect ); sscanf( String[ 1 ], "p<:>ii", mTime[ playerid ][ 0 ], mTime[ playerid ][ 1 ] ); } if( PlayerInfo[ playerid ][ Frozen ] == 1 ) { cache_get_field_content( 0, "FreezeTime", String[ 2 ], DB_Connect ); sscanf( String[ 2 ], "p<:>ii", fTime[ playerid ][ 0 ], fTime[ playerid ][ 1 ] ); } mysql_format( DB_Connect, query, sizeof( query ), "UPDATE `Accounts` SET `LoggedIn` = '1', `IP` = '%s' WHERE `ID` = '%d'", GetPlayerIPEx( playerid ), PlayerInfo[ playerid ][ AccID ] ); mysql_tquery( DB_Connect, query, "", "" ); LoginPlayerInfo( playerid ); return 1; }
Код:
stock LoginPlayerInfo( playerid ) { new AdmRank[ 2000 ], VipRank[ 2000 ]; new aLevel = PlayerInfo[ playerid ][ Level ]; new vLevel = PlayerInfo[ playerid ][ pVIP ]; switch( aLevel ) { case 1: AdmRank = "{CC6633}Trial-Helper"; case 2: AdmRank = "{3371CC}Basic-Helper"; case 3: AdmRank = "{3371CC}Master-Helper"; case 4: AdmRank = "{33FF99}Moderator"; case 5: AdmRank = "{33FF00}Basic-Moderator"; case 6: AdmRank = "{996600}Master-Moderator"; case 7: AdmRank = "{FF9900}Administrator"; case 8: AdmRank = "{CCFF00}Basic-Administrator"; case 9: AdmRank = "{FFCC00}Master-Administrator"; case 10: AdmRank = "{FF0000}Owner"; } switch( vLevel ) { case 1: VipRank = "{66FF66}Survior V.I.P"; case 2: VipRank = "{FFFF00}Hero V.I.P"; case 3: VipRank = "{FF3300}Advanced V.I.P"; } if( PlayerInfo[ playerid ][ Level ] > 0 && PlayerInfo[ playerid ][ pVIP ] == 0 ) { eBigString[ 0 ] = EOS; format( eBigString, sizeof( eBigString ), "[SV-INFO]: %s {C0C0C0}- {%06x}%s(%d) {C0C0C0}has been logged in.", AdmRank, GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); SendClientMessageToAll( 0xC0C0C0FF, eBigString ); } if( PlayerInfo[ playerid ][ pVIP ] > 0 && PlayerInfo[ playerid ][ Level ] == 0 ) { eBigString[ 0 ] = EOS; format( eBigString, sizeof( eBigString ), "[SV-INFO]: %s {C0C0C0}- {%06x}%s(%d) {C0C0C0}has been logged in.", VipRank, GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); SendClientMessageToAll( 0xC0C0C0FF, eBigString ); } if( PlayerInfo[ playerid ][ pVIP ] > 0 && PlayerInfo[ playerid ][ Level ] > 0 ) { eBigString[ 0 ] = EOS; format( eBigString, sizeof( eBigString ), "[SV-INFO]: %s {C0C0C0}+ V.I.P - {%06x}%s(%d) {C0C0C0}has been logged in.", AdmRank, GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); SendClientMessageToAll( 0xC0C0C0FF, eBigString ); } if( PlayerInfo[ playerid ][ pVIP ] == 0 && PlayerInfo[ playerid ][ Level ] == 0 ) { eBigString[ 0 ] = EOS; format( eBigString, sizeof( eBigString ), "[SV-INFO]: {%06x}%s(%d) {C0C0C0}has been logged in.", GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid ); SendClientMessageToAll( 0xC0C0C0FF, eBigString ); } return 1; }
Код:
function OnAccountCreated( playerid ) { PlayerInfo[ playerid ][ AccID ] = cache_insert_id( DB_Connect ); ServerInfo[ sAccounts ] = cache_insert_id( DB_Connect ); eBigString[ 0 ] = EOS; format( eBigString, 4096, "[SV INFO]: {%06x}%s(%d) {C0C0C0}has been registered sucesfully. Total reigstered accounts: {FFFFFF}'{FF0000}%d{FFFFFF}'{C0C0C0}.", GetPlayerColor( playerid ) >>> 8, PlayerName( playerid ), playerid, PlayerInfo[ playerid ][ AccID ] ); SendClientMessageToAll( 0xC0C0C0FF, eBigString ); return 1; }
Please respond to this topic, i gave all the details.. if someone knows pawno, scripting better than i do
PLEASE don't hesitate to help me. For more details reply. Thanks guys.