-
Posts
716 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Everything posted by Diabolik
-
Inloc de : Binfo[bASEnumber][Nameb] = pname; pune Binfo[bASEnumber][Nameb]; , nustiu sigur dar ia vezi daca iti merge.
-
Stai 10 -15 minunte ca iti rezolv eu scriptul. Link: #include <a_samp> #define COLOR_WHITE 0xFFFFFFFF #define COLOR_ORANGE 0xFF8000FF #define SCM SendClientMessage #define FILTERSCRIPT forward OnPlayerRegister ( playerid , password [ ] ) ; forward SavePlayerData ( playerid ) ; forward OnPlayerLogin ( playerid , password [ ] ) ; //============================================================================== public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } //============================================================================== public OnFilterScriptExit() { return 1; } //============================================================================== enum pInfo { iKey, pImprumut, pImprumut1, pImprumut2, pImprumut3, pImprumut4, pImprumut5, pImprumut6, pImprumut7 }; new PlayerInfo [ MAX_PLAYERS ] [ pInfo ] ; //============================================================================== forward CKLog ( string [ ] ) ; public CKLog ( string [ ] ) { new entry[256]; format(entry, sizeof(entry), "%s\n",string); new File:hFile; hFile = fopen("Logs/ck.log", io_append); fwrite(hFile, entry); fclose(hFile); } //============================================================================== forward ini_GetValue( line[] ) ; stock ini_GetValue( line[] ) { new valRes[256]; valRes[0]=0; if ( strfind( line , "=" , true ) == -1 ) return valRes; strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) ); return valRes; } //============================================================================== forward ini_GetKey( line[] ) ; stock ini_GetKey( line[] ) { new keyRes[256]; keyRes[0] = 0; if ( strfind( line , "=" , true ) == -1 ) return keyRes; strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) ); return keyRes; } //============================================================================== public OnPlayerConnect(playerid) { PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut1] = 0; PlayerInfo[playerid][pImprumut2] = 0; PlayerInfo[playerid][pImprumut3] = 0; PlayerInfo[playerid][pImprumut4] = 0; PlayerInfo[playerid][pImprumut5] = 0; PlayerInfo[playerid][pImprumut6] = 0; PlayerInfo[playerid][pImprumut7] = 0; return 1; } public OnPlayerRegister(playerid, password[]) { new string3[32]; new var[32]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); format(string3, sizeof(string3), "Inprumuturi/%s.ini", playername3); new File: hFile = fopen(string3, io_write); if (hFile) { format(var, 32, "Imprumutat=%d\n",PlayerInfo[playerid][pImprumut]);fwrite(hFile, var); format(var, 32, "Imprumutat1=%d\n",PlayerInfo[playerid][pImprumut1]);fwrite(hFile, var); format(var, 32, "Imprumutat2=%d\n",PlayerInfo[playerid][pImprumut2]);fwrite(hFile, var); format(var, 32, "Imprumutat3=%d\n",PlayerInfo[playerid][pImprumut3]);fwrite(hFile, var); format(var, 32, "Imprumutat4=%d\n",PlayerInfo[playerid][pImprumut4]);fwrite(hFile, var); format(var, 32, "Imprumutat5=%d\n",PlayerInfo[playerid][pImprumut5]);fwrite(hFile, var); format(var, 32, "Imprumutat6=%d\n",PlayerInfo[playerid][pImprumut6]);fwrite(hFile, var); format(var, 32, "Imprumutat7=%d\n",PlayerInfo[playerid][pImprumut7]);fwrite(hFile, var); } return 1; } public SavePlayerData(playerid) { new string3[32]; new var[32]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); format(string3, sizeof(string3), "Inprumuturi/%s.ini", playername3); new File: hFile = fopen(string3, io_write); if (hFile) { format(var, 32, "Imprumutat=%d\n",PlayerInfo[playerid][pImprumut]);fwrite(hFile, var); format(var, 32, "Imprumutat1=%d\n",PlayerInfo[playerid][pImprumut1]);fwrite(hFile, var); format(var, 32, "Imprumutat2=%d\n",PlayerInfo[playerid][pImprumut2]);fwrite(hFile, var); format(var, 32, "Imprumutat3=%d\n",PlayerInfo[playerid][pImprumut3]);fwrite(hFile, var); format(var, 32, "Imprumutat4=%d\n",PlayerInfo[playerid][pImprumut4]);fwrite(hFile, var); format(var, 32, "Imprumutat5=%d\n",PlayerInfo[playerid][pImprumut5]);fwrite(hFile, var); format(var, 32, "Imprumutat6=%d\n",PlayerInfo[playerid][pImprumut6]);fwrite(hFile, var); format(var, 32, "Imprumutat7=%d\n",PlayerInfo[playerid][pImprumut7]);fwrite(hFile, var); } return 1; } public OnPlayerLogin(playerid,password[]) { new string2[64]; new playername2[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername2, sizeof(playername2)); format(string2, sizeof(string2), "Users/%s.ini", 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 = ( PassData ); strmid(PlayerInfo[playerid][iKey], valtmp, 0, strlen(valtmp)-1, 255); } if(strcmp(PlayerInfo[playerid][iKey],password, true ) == 0 ) { new Data[ 256 ] , key[512] , val[512] ; if( strcmp( key , "Imprumut" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut] = strval( val ); } if( strcmp( key , "Imprumut1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut1] = strval( val ); } if( strcmp( key , "Imprumut2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut2] = strval( val ); } if( strcmp( key , "Imprumut3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut3] = strval( val ); } if( strcmp( key , "Imprumut4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut4] = strval( val ); } if( strcmp( key , "Imprumut5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut5] = strval( val ); } if( strcmp( key , "Imprumut6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut6] = strval( val ); } if( strcmp( key , "Imprumut7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImprumut7] = strval( val ); } } } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[512]; if(strcmp(cmd, "/borrow", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Use The Next Commands To Borrow From The Bank"); SendClientMessage(playerid, COLOR_WHITE, "/Borrow1000"); SendClientMessage(playerid, COLOR_WHITE, "/Borrow5000"); SendClientMessage(playerid, COLOR_WHITE, "/Borrow10000"); SendClientMessage(playerid, COLOR_WHITE, "/Borrow25000"); SendClientMessage(playerid, COLOR_WHITE, "/Borrow50000"); SendClientMessage(playerid, COLOR_WHITE, "/Borrow75000"); SendClientMessage(playerid, COLOR_WHITE, "/Borrow100000"); } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/borrow1000", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { GivePlayerMoney(playerid, 1000); SCM(playerid, COLOR_WHITE, "You Borrowed 1000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp"); PlayerInfo[playerid][pImprumut] = 1; PlayerInfo[playerid][pImprumut1] = 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/borrow5000", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { GivePlayerMoney(playerid, 5000); SCM(playerid, COLOR_WHITE, "You Borrowed 5000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp"); PlayerInfo[playerid][pImprumut] = 1; PlayerInfo[playerid][pImprumut2] = 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/borrow10000", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { GivePlayerMoney(playerid, 10000); SCM(playerid, COLOR_WHITE, "You Borrowed 10000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp"); PlayerInfo[playerid][pImprumut] = 1; PlayerInfo[playerid][pImprumut3] = 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/borrow25000", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { GivePlayerMoney(playerid, 25000); SCM(playerid, COLOR_WHITE, "You Borrowed 25000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp"); PlayerInfo[playerid][pImprumut] = 1; PlayerInfo[playerid][pImprumut4] = 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/borrow50000", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { GivePlayerMoney(playerid, 50000); SCM(playerid, COLOR_WHITE, "You Borrowed 50000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp"); PlayerInfo[playerid][pImprumut] = 1; PlayerInfo[playerid][pImprumut5] = 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/borrow75000", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { GivePlayerMoney(playerid, 75000); SCM(playerid, COLOR_WHITE, "You Borrowed 75000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp"); PlayerInfo[playerid][pImprumut] = 1; PlayerInfo[playerid][pImprumut6] = 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/borrow100000", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut] == 1) { GivePlayerMoney(playerid, 100000); SCM(playerid, COLOR_WHITE, "You Borrowed 100000$, Please Pay The Amount Back Or You Will Not Be Able To LevelUp"); PlayerInfo[playerid][pImprumut] = 1; PlayerInfo[playerid][pImprumut7] = 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "You Already Borrowed From The Bank, Please, Pay The Amount You Borrowed Back To Borrow Again."); return 1; } return 1; } if(strcmp(cmd, "/PayAmountBack", true) == 0) // By marijuana { if(PlayerInfo[playerid][pImprumut1] == 1) { if(PlayerInfo[playerid][pImprumut2] == 1) { if(PlayerInfo[playerid][pImprumut3] == 1) { if(PlayerInfo[playerid][pImprumut4] == 1) { if(PlayerInfo[playerid][pImprumut5] == 1) { if(PlayerInfo[playerid][pImprumut6] == 1) { if(PlayerInfo[playerid][pImprumut7] == 1) { SendClientMessage(playerid, COLOR_WHITE, "You are about to pay your debt to the bank"); } else { GivePlayerMoney(playerid, -1000); SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp."); PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut1] = 0; return 1; } else { GivePlayerMoney(playerid, -5000); SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp."); PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut2] = 0; return 1; } else { GivePlayerMoney(playerid, -10000); SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp."); PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut3] = 0; return 1; } else { GivePlayerMoney(playerid, -25000); SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp."); PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut4] = 0; return 1; } else { GivePlayerMoney(playerid, -50000); SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp."); PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut5] = 0; return 1; } else { GivePlayerMoney(playerid, -75000); SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp."); PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut6] = 0; return 1; } else { GivePlayerMoney(playerid, -100000); SCM(playerid, COLOR_WHITE, "You Payed Your Debt To The Bank. You Can Now LevelUp."); PlayerInfo[playerid][pImprumut] = 0; PlayerInfo[playerid][pImprumut7] = 0; return 1; } } } } } } } } return 0; }
-
Bravo 10/10 pentru mapa.
-
Frumos gamemod , bravo 9/10
-
Bun tutorial . 5/5
-
Bravo 5/5 pentru mapa aceasta.
-
Frumoasa mapa , multumesc 5/5.
-
Incearca: #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
-
Bravo , bun tutorial 9/10
-
Mi se pare o tampenie sa mai faci si un fs ca sa iti salveaza coordonatele plus iti ocupa spatiu pe server, 3/5 e mai usor cu /save.
-
Register System [BUD, Usor de configurat]
Diabolik replied to XStormiest's topic in Filterscript-uri
Bravo un script foarte bun. 10/10 -
Incearca asa: CMD:ls(playerid,params[]) { SetPlayerPos(playerid, 2488.0310,-1669.7568,13.3359); return (1) ; }
-
Pune comanda aici ca nustim noi ce are comanda ta.
-
Va multumesc la tuturor , poate o sa scot si o noua versiune.
-
Descriere: Este un mic filterscript prin care poti sa pornesti loteria si sa iti cumperi bilet pentru a participa la concurs. Comenzi: /startlotto [RCON] /lotto [numar] Poza: Download: http://zipansion.com/29EPg
-
Vroiam sa zic e mai usor sa pui cu SendRconCommand in gamemod inloc sa faci un filterscript de 50 de linii.