Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <utils>
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define COLOR_GREY 0xBEBEBEAA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- forward ShowStats(playerid,targetid);
- forward OnPlayerUpdate(playerid);
- forward Encrypt(string[]);
- forward OnPlayerLogin(playerid,password[]);
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- forward ABroadCast(color,const string[],level);
- forward CustomPickups();
- forward OnPlayerRegister(playerid, password[]);
- enum pInfo
- {
- pPassword[128],
- pKills,
- pDeaths,
- pCash,
- pBank,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new gPlayerLogged[MAX_PLAYERS];
- new gPlayerAccount[MAX_PLAYERS];
- new ConsumingMoney[MAX_PLAYERS];
- new sendername[MAX_PLAYER_NAME];
- new playermoney;
- new gPlayerLogTries[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
- print(" Kevin433's Login/Register Filterscript");
- print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
- SetTimer("CustomPickups", 1000, 1);
- AddStaticPickup(1274, 2,2026.4064,1017.9352,10.8203);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new playrname[MAX_PLAYER_NAME];
- new connect[128];
- GetPlayerName(playerid, playrname, sizeof(playrname));
- format(connect, sizeof(connect), "%s.cer", playrname);
- if(fexist(connect))
- {
- gPlayerAccount[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW, "You are registered, please login with /login password");
- return 1;
- }
- else
- {
- gPlayerAccount[playerid] = 0;
- SendClientMessage(playerid, COLOR_YELLOW, "You are new here or not registered, please register with /register password");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- OnPlayerUpdate(playerid);
- gPlayerLogged[playerid] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new kills = PlayerInfo[playerid][pKills];
- SetPlayerScore(playerid, kills);
- new Float:Health;
- GetPlayerHealth(playerid, Health);
- if(Health == 0.0)
- {
- PlayerInfo[playerid][pDeaths] += 1;
- }
- GivePlayerMoney(killerid,2000);
- PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256];
- new idx;
- cmd = strtok(cmdtext, idx);
- new tmp[256];
- new playername[MAX_PLAYER_NAME];
- new string[256];
- new moneys;
- new giveplayer[MAX_PLAYER_NAME];
- new giveplayerid;
- if (strcmp(cmd, "/login", true) ==0 )
- {
- if(IsPlayerConnected(playerid))
- {
- new tmppass[64];
- if(gPlayerLogged[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /login [password]");
- return 1;
- }
- strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
- Encrypt(tmppass);
- OnPlayerLogin(playerid,tmppass);
- }
- return 1;
- }
- if (strcmp(cmd, "/register", true) ==0 )
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "%s.cer", sendername);
- new File: hFile = fopen(string, io_read);
- if (hFile)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
- fclose(hFile);
- return 1;
- }
- new tmppass[64];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");
- return 1;
- }
- strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
- Encrypt(tmppass);
- OnPlayerRegister(playerid,tmppass);
- }
- return 1;
- }
- if (strcmp(cmd, "/stats", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (gPlayerLogged[playerid] != 0)
- {
- ShowStats(playerid,playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
- }
- }
- return 1;
- }
- //=================[Bank System]================================================================
- if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(!PlayerToPoint(20.0,playerid,2026.4064,1017.9352,10.8203))
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pBank]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- new cashdeposit = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pBank]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
- return 1;
- }
- GivePlayerMoney(playerid,-cashdeposit);
- new curfunds = PlayerInfo[playerid][pBank];
- PlayerInfo[playerid][pBank]=cashdeposit+PlayerInfo[playerid][pBank];
- SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
- format(string, sizeof(string), " Old Balance: $%d", curfunds);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- format(string, sizeof(string), " Deposit: $%d",cashdeposit);
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
- format(string, sizeof(string), " New Balance: $%d", PlayerInfo[playerid][pBank]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/withdraw", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(!PlayerToPoint(20.0,playerid,2026.4064,1017.9352,10.8203))
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /withdraw [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pBank]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- new cashdeposit = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /withdraw [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pBank]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- if (cashdeposit > PlayerInfo[playerid][pBank] || cashdeposit < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !");
- return 1;
- }
- ConsumingMoney[playerid] = 1;
- GivePlayerMoney(playerid,cashdeposit);
- PlayerInfo[playerid][pBank]=PlayerInfo[playerid][pBank]-cashdeposit;
- format(string, sizeof(string), " You Have Withdrawn $%d from your account Total: $%d ", cashdeposit,PlayerInfo[playerid][pBank]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/balance", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(!PlayerToPoint(20.0,playerid,2026.4064,1017.9352,10.8203))
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- format(string, sizeof(string), " You Have $%d in your account.",PlayerInfo[playerid][pBank]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/transfer", true) == 0 || strcmp(cmd, "/wiretransfer", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(!PlayerToPoint(20.0,playerid,2305.688964,-16.088100,26.749599))
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if (IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- playermoney = PlayerInfo[playerid][pBank] ;
- if (moneys > 0 && playermoney >= moneys)
- {
- PlayerInfo[playerid][pBank] -= moneys;
- PlayerInfo[giveplayerid][pBank] += moneys;
- format(string, sizeof(string), " You have transferd $%d to %s's account", moneys, giveplayer,giveplayerid);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), " You have recieved $%d to into your account from %s", moneys, sendername, playerid);
- SendClientMessage(giveplayerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "%s transferd $%d to %s", sendername, moneys, giveplayer);
- if(moneys >= 500000)
- {
- ABroadCast(COLOR_YELLOW,string,1);
- }
- printf("%s", string);
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
- }
- }
- }
- else
- {
- format(string, sizeof(string), " %d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- return 1;
- }
- //==========================[Enter and Exit]==========================================================================================================
- if(strcmp(cmd, "/enter", true) == 0)
- {
- if (PlayerToPoint(3.0, playerid,2026.4064,1017.9352,10.8203))// Bank
- {
- SetPlayerPos(playerid,2305.688964,-16.088100,26.749599);
- GameTextForPlayer(playerid, "~w~Welcome to the City Bank!~n~~w~Type /exit to get out", 5000, 1);
- SetPlayerInterior(playerid, 0);
- }
- return 1;
- }
- if(strcmp(cmdtext, "/exit", true) == 0)
- {
- if (PlayerToPoint(3.0, playerid,2305.688964,-16.088100,26.749599))// Bank
- {
- SetPlayerPos(playerid,2026.4064,1017.9352,10.8203);
- SetPlayerInterior(playerid, 0);
- }
- return 1;
- }
- return 0;
- }
- public Encrypt(string[])
- {
- for(new x=0; x < strlen(string); x++)
- {
- string[x] += (3^x) * (x % 15);
- if(string[x] > (0xff))
- {
- string[x] -= 64;
- }
- }
- return 1;
- }
- public OnPlayerLogin(playerid,password[])
- {
- new pname2[MAX_PLAYER_NAME];
- new pname3[MAX_PLAYER_NAME];
- new string2[64];
- new string3[128];
- GetPlayerName(playerid, pname2, sizeof(pname2));
- format(string2, sizeof(string2), "%s.cer", pname2);
- new File: UserFile = fopen(string2, io_read);
- if (UserFile)
- {
- new valtmp[128];
- fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
- new PassData[256];
- new keytmp[256];
- fread( UserFile , PassData , sizeof( PassData ) );
- keytmp = ini_GetKey( PassData );
- if( strcmp( keytmp , "Password" , true ) == 0 )
- {
- valtmp = ini_GetValue( PassData );
- strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
- }
- if(strcmp(PlayerInfo[playerid][pPassword],password, true ) == 0)
- {
- new key[128],val[128];
- new Data[128];
- while(fread(UserFile,Data,sizeof(Data)))
- {
- key = ini_GetKey(Data);
- if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
- if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
- if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
- if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBank] = strval( val ); }
- GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
- }
- fclose(UserFile);
- gPlayerLogged[playerid] = 1;
- gPlayerAccount[playerid] = 1;
- new kills = PlayerInfo[playerid][pKills];
- SetPlayerScore(playerid, kills);
- GetPlayerName(playerid, pname3, sizeof(pname3));
- format(string3, sizeof(string3), "Welcome %s, you have been succesfully logged in!", pname3);
- SendClientMessage(playerid, COLOR_WHITE,string3);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Password does not match your name");
- fclose(UserFile);
- }
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid])
- {
- new string3[32];
- new pname3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname3, sizeof(pname3));
- format(string3, sizeof(string3), "%s.cer", pname3);
- new File: pFile = fopen(string3, io_write);
- if (pFile)
- {
- new var[32];
- format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
- fclose(pFile);
- new File: hFile = fopen(string3, io_append);
- PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
- format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
- format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
- format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
- format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]);fwrite(hFile, var);
- fclose(hFile);
- }
- }
- }
- return 1;
- }
- stock ini_GetKey( line[] )
- {
- new keyRes[128];
- keyRes[0] = 0;
- if ( strfind( line , "=" , true ) == -1 ) return keyRes;
- strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
- return keyRes;
- }
- stock ini_GetValue( line[] )
- {
- new valRes[128];
- valRes[0]=0;
- if ( strfind( line , "=" , true ) == -1 ) return valRes;
- strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
- return valRes;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public ShowStats(playerid,targetid)
- {
- if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
- {
- new cash = GetPlayerMoney(targetid);
- new deaths = PlayerInfo[targetid][pDeaths];
- new kills = PlayerInfo[targetid][pKills];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(targetid, name, sizeof(name));
- new Float:px,Float:py,Float:pz;
- GetPlayerPos(targetid, px, py, pz);
- new coordsstring[256];
- new bank = PlayerInfo[targetid][pBank];
- SendClientMessage(playerid, COLOR_GREEN,"________________________________________________");
- format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] Cash:[$%d] Bank:[$%d]",kills,deaths,cash,bank);
- SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
- SendClientMessage(playerid, COLOR_GREEN,"________________________________________________");
- }
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- public ABroadCast(color,const string[],level)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- return 1;
- }
- public CustomPickups()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (PlayerToPoint(3, i,2026.4064,1017.9352,10.8203)) // Bank
- {
- GameTextForPlayer(i, "~y~Welcome to The ~y~City Bank~n~~w~Type /enter to go in", 5000, 5);
- }
- }
- return 1;
- }
- public OnPlayerRegister(playerid, password[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string3[32];
- new playername3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername3, sizeof(playername3));
- format(string3, sizeof(string3), "%s.ini", playername3);
- new File: hFile = fopen(string3, io_write);
- if (hFile)
- {
- strmid(PlayerInfo[playerid][pPassword], password, 0, strlen(password), 255);
- new var[32];
- format(var, 32, "Password=%s\n", PlayerInfo[playerid][pPassword]);fwrite(hFile, var);
- PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
- format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
- format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
- format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
- format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]);fwrite(hFile, var);
- fclose(hFile);
- SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you can login now (/login [password]).");
- }
- }
- return 1;
- }
- public OnPlayerLogin(playerid,password[])
- {
- new tmp2[256];
- new string2[64];
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- format(string2, sizeof(string2), "%s.cer", playername2);
- new File: UserFile = fopen(string2, io_read);
- if ( UserFile )
- {
- new PassData[256];
- new keytmp[256], valtmp[256];
- fread( UserFile , PassData , sizeof( PassData ) );
- keytmp = ini_GetKey( PassData );
- if( strcmp( keytmp , "Key" , true ) == 0 )
- {
- valtmp = ini_GetValue( PassData );
- strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
- }
- if(strcmp(PlayerInfo[playerid][pPassword],password, true ) == 0 )
- {
- new key[ 256 ] , val[ 256 ];
- new Data[ 256 ];
- while ( fread( UserFile , Data , sizeof( Data ) ) )
- {
- key = ini_GetKey( Data );
- if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
- if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
- if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
- if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBank] = strval( val ); }
- GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
- }//end while
- fclose(UserFile);//close the file after everything has been read in the while
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password does not match your name.");
- fclose(UserFile);
- gPlayerLogTries[playerid] += 1;
- if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
- return 1;
- }
- ConsumingMoney[playerid] = 1;
- format(string2, sizeof(string2), "SERVER: Welcome %s",playername2);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- printf("%s has logged in.",playername2);
- gPlayerLogged[playerid] = 1;
- format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~y~ %s", playername2);
- GameTextForPlayer(playerid, tmp2, 5000, 1);
- gPlayerLogged[playerid] = 1;
- gPlayerAccount[playerid] = 1;
- new kills = PlayerInfo[playerid][pKills];
- SetPlayerScore(playerid, kills);
- }
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement