17.03.2011, 20:52
ho can to its pavano take bank sistem?
paw file
http://www63.zippyshare.com/v/20290067/file.html
Код:
/************************ [Simple Admin by Gaudenas] **************************/ /****************************** [2011-01-21] **********************************/ #include <a_samp> #include <zcmd_sscanf> #include <dudb> #include <dini> #pragma tabsize 0 #define COLOR_YELLOW 0xFFFF00AA #define COLOR_BLACK 0x000000AA #define COLOR_GREEN 0x33AA33AA #define COLOR_LIGHTGREEN 0x7CFC00AA #define COLOR_WHITE 0xFFFFFFFF #define COLOR_GRAD1 0xB4B5B7AA #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_RED 0xFF0000FF #define COLOR_VIOLET 0x8000FFFF #define COLOR_BLUE 0x0512CCAA #define SERVER 0xB3C8F2FF #define ADMIN 0x4CC84CFF #define ERROR 0xF80519FF #define SUCCES 0x8DE82FFF #define RAUDONA 0xF80519FF #define MELYNA 0x4961A9FF #define ORANGE 0xFF8000FF enum PlayerInfo { Admin, Money, Taskai, Mirtys, Killai, Bank, } new pInfo[MAX_PLAYERS][PlayerInfo]; new bankiejimas; new bankisejimas; stock PlayerName(id) { new name[MAX_PLAYER_NAME]; GetPlayerName(id, name, MAX_PLAYER_NAME); return name; } public OnFilterScriptInit() { print("\n--------------------------------------"); print(" gAdmin by Gaudenas Loading 2011-01-21 "); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerConnect(playerid) { new string[64],pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,"%s jungiasi prie serverio. Sveiki!",pName); SendClientMessageToAll(COLOR_GREEN,string); new pFile[128], w[128]; format(pFile, sizeof(pFile), "users/%s.ini", PlayerName(playerid)); if(!dini_Exists(pFile)) { format(w,sizeof(w),"Prasome uzsiregistruoti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Registracija",w,"Registruotis","Atmesti"); } else { format(w,sizeof(w),"Prasome prisijungti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas",w,"Prisijungti","Atsmesti"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new vardas[MAX_PLAYER_NAME], string[128], pFile[128]; GetPlayerName(playerid, vardas, sizeof(vardas)); switch(reason) { case 0: format(string, sizeof(string), "** %s atsijunge. (Klaida)", vardas); case 1: format(string, sizeof(string), "** %s atsijunge. ", vardas); case 2: format(string, sizeof(string), "** %s atsijunge. (Isspirtas)", vardas); } SendClientMessageToAll(ERROR, string); GetPlayerName(playerid, vardas, sizeof(vardas)); format(pFile, sizeof(pFile), "users/%s.ini", PlayerName(playerid)); dini_IntSet(pFile, "Pinigai", GetPlayerMoney(playerid)); dini_IntSet(pFile, "Taskai", GetPlayerScore(playerid)); dini_IntSet(pFile, "Mirtys", pInfo[playerid][Mirtys]); dini_IntSet(pFile, "Nuzudymai", pInfo[playerid][Killai]); dini_IntSet(pFile, "Banke", pInfo[playerid][Bank]); return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { pInfo[playerid][Mirtys] = (pInfo[playerid][Mirtys]+1); pInfo[playerid][Killai] = (pInfo[playerid][Killai]+1); SendDeathMessage(killerid, playerid, reason); SetPlayerScore(killerid, 1); ResetPlayerMoney(playerid); return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } ///Komandos COMMAND:padeti(playerid, params[]) { new suma,string[100]; if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2324.33,-1144.79,1050.71)) return SendClientMessage(playerid, ERROR,"** Tu nesi banke!"); if(sscanf(params,"i", suma)) return SendClientMessage(playerid, ERROR, "** Padeti pinigus i banka: /padeti [suma]"); if(suma == GetPlayerMoney(playerid)) return SendClientMessage(playerid, ERROR, "* Tu tiek pinigu neturi"); pInfo[playerid][Bank] = (pInfo[playerid][Bank] + suma); GivePlayerMoney(playerid, -suma); format(string,sizeof(string),"[gBANK]:Tu i banka padejai %d.",suma); SendClientMessage(playerid,COLOR_YELLOW, string); return 1; } COMMAND:paiimti(playerid, params[]) { new suma, string[100]; if(!IsPlayerInRangeOfPoint(playerid, 7.0,2324.33,-1144.79,1050.71)) return SendClientMessage(playerid, ERROR,"** Tu nesi banke!"); if(sscanf(params,"i", suma)) return SendClientMessage(playerid, ERROR, "** Paiimti pinigus is banka: /paiimti [suma]"); if(suma == pInfo[playerid][Bank]) return SendClientMessage(playerid, ERROR, "* Tu tiek pinigu neturi"); pInfo[playerid][Bank] = (pInfo[playerid][Bank] -suma); GivePlayerMoney(playerid, suma); format(string,sizeof(string),"[gBANK]:Tu is banko pasiimei %d.",suma); SendClientMessage(playerid,COLOR_YELLOW, string); return 1; } COMMAND:balansas(playerid, params[]) { new string[100]; if(!IsPlayerInRangeOfPoint(playerid, 7.0, 2324.33,-1144.79,1050.71)) return SendClientMessage(playerid, ERROR,"** Tu nesi banke!"); format(string,sizeof(string),"[gBANK]:Tavo banko balansas %d.",pInfo[playerid][Bank]); SendClientMessage(playerid,COLOR_YELLOW, string); return 1; } //Pabaiga COMMAND:pm(playerid, params[]) { new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME]; if(sscanf(params, "us", id, str2)) { SendClientMessage(playerid, 0xFF0000FF, "* SYSTEM: /pm <zaidejo ID> <zinute>"); return 1; } if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "* KLAIDA: Zaidejas neprisijunges!"); if(playerid == id) return SendClientMessage(playerid, COLOR_RED, "* KLAIDA: Negali siusti sau PM!"); { GetPlayerName(playerid, Name1, sizeof(Name1)); GetPlayerName(id, Name2, sizeof(Name2)); format(str, sizeof(str), "Pranesimas %s(ID %d): %s", Name2, id, str2); SendClientMessage(playerid, 0xFF0000FF, str); format(str, sizeof(str), "Pranesimas nuo %s(ID %d): %s", Name1, playerid, str2); SendClientMessage(id, COLOR_YELLOW, str); } return 1; } COMMAND:admin(playerid) { new zin[256] = "Prisijunge adminai:"; new name[MAX_PLAYER_NAME]; for(new i = 0; i <MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && pInfo[playerid][Admin] == 1) { GetPlayerName(i,name,MAX_PLAYER_NAME); format(zin,256,"%s %s,",zin,name); } } SendClientMessage(playerid,COLOR_WHITE,zin); return 1; } /******************************** [TELEPORTAI] ********************************/ COMMAND:sf(playerid) { new cartype = GetPlayerVehicleID(playerid), string[256], pName[256]; new State=GetPlayerState(playerid); { if(State!=PLAYER_STATE_DRIVER) { SetPlayerPos(playerid,-2015.9153,178.1666,27.6799); } else if(IsPlayerInVehicle(playerid, cartype) == 1) { SetVehiclePos(cartype,-2015.9153,178.1666,27.6799); SetVehicleZAngle(cartype,91); } else { SetPlayerPos(playerid,-2015.9153,178.1666,27.6799); } GameTextForPlayer(playerid,"~r~SanFierro!",2500,3); } GetPlayerName(playerid, pName, 30); format(string, 280, "* SYSTEM: %s Dabar SanFierro Mieste (/sf)", pName); SendClientMessageToAll(COLOR_WHITE, string); return 1; } /********************************** [aKOMANDOS] *******************************/ COMMAND:kick(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams."); new zID, Reason[128]; if(sscanf(params,"is", zID, Reason)) return SendClientMessage(playerid, ERROR, "** Ismesti zaidėją is serverio: /kick [zaidejo ID] [Priezastis]"); if(zID == INVALID_PLAYER_ID && !IsPlayerNPC(zID)) return SendClientMessage(playerid, ERROR, "** Zaidejo su siuo ID serveryje nera."); if(zID == playerid) return SendClientMessage(playerid, ERROR, " Saves is serverio negalite ismesti."); new String[128]; if(pInfo[playerid][Admin] == 1) format(String, 128, "Administratorius %s ismete zaideja %s is serverio (Priezastis: %s)",PlayerName(playerid), PlayerName(zID), Reason); SendClientMessageToAll(RAUDONA, String); if(pInfo[playerid][Admin] == 1) format(String, 128, "Administratorius %s ismete jus is serverio (Priezastis: %s)",PlayerName(playerid), Reason); SendClientMessage(zID, RAUDONA, String); format(String, 128, "** [SYSTEM]: Zaidejas sekmingai ismestas"); SendClientMessage(playerid, COLOR_VIOLET," String"); Kick(zID); return 1; } COMMAND:ban(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams ir moderatoriams."); new zID, Reason[128]; if(sscanf(params,"is", zID, Reason)) return SendClientMessage(playerid, ERROR, "** Uzblokuoti zaideja serveryje: /ban [zaidejo ID] [Priezastis]"); if(zID == INVALID_PLAYER_ID && !IsPlayerNPC(zID)) return SendClientMessage(playerid, ERROR, "** zaidėjo su siuo ID serveryje nera."); if(zID == playerid) return SendClientMessage(playerid, ERROR, "** Saves serveryje uzblokuoti negalite."); new String[128]; if(pInfo[playerid][Admin] == 1) format(String, 128, "Administratorius %s uzblokavo zaideja %s serveryje (Priezastis: %s)",PlayerName(playerid), PlayerName(zID), Reason); SendClientMessageToAll(RAUDONA, String); if(pInfo[playerid][Admin] == 1) format(String, 128, "Administratorius %s uzblokavo jus serveryje (Priezastis: %s)",PlayerName(playerid), Reason); SendClientMessage(zID, RAUDONA, String); SendClientMessage(playerid, COLOR_VIOLET,"* [SYSTEM] Zaidejas sekmingai uzblokuotas"); BanEx(zID, Reason); return 1; } COMMAND:say(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams ir moderatoriams."); new Text[128]; if(sscanf(params,"s", Text)) return SendClientMessage(playerid, ERROR, "** Pranesti visiems: /say [Skelbimas]"); new String[128]; if(pInfo[playerid][Admin] == 1) format(String, 128, "Admin: %s : %s",PlayerName(playerid), Text); SendClientMessageToAll(RAUDONA, String); return 1; } COMMAND:duotilt(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams."); new zID, suma; if(sscanf(params,"dd", zID, suma)) return SendClientMessage(playerid, ERROR, "** Duoti pinigu: /duotiLT [zaidejo ID] [suma]"); if(zID == INVALID_PLAYER_ID && !IsPlayerNPC(zID)) return SendClientMessage(playerid, ERROR, "** Zaidejo su siuo ID serveryje nera."); if(zID == playerid) return SendClientMessage(playerid, ERROR, " Sau negalite duoti LT"); new String[128]; if(!CheckValidLT(suma)) return SendClientMessage(playerid, COLOR_GREEN, "* [SYSTEM]: Tiek litu negali duoti [0-1000000]"); if(pInfo[playerid][Admin] == 1) format(String, 128, "Administratorius %s padovanojo jums Litu: %d",PlayerName(playerid), suma); SendClientMessage(zID, RAUDONA, String); format(String, 128, "** [SYSTEM]: Zaidejas sekmingai apdovanotas"); SendClientMessage(playerid, COLOR_VIOLET,String); GivePlayerMoney(zID, suma); return 1; } COMMAND:duotixp(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams."); new zID, suma; if(sscanf(params,"dd", zID, suma)) return SendClientMessage(playerid, ERROR, "** Duoti tasku: /duotixp [zaidejo ID] [kiekis]"); if(zID == INVALID_PLAYER_ID && !IsPlayerNPC(zID)) return SendClientMessage(playerid, ERROR, "** Zaidejo su siuo ID serveryje nera."); if(zID == playerid) return SendClientMessage(playerid, ERROR, " Sau negalite duoti Tasku"); new String[128]; if(!CheckValidLT(suma)) return SendClientMessage(playerid, COLOR_GREEN, "* [SYSTEM]: Tiek tasku negali duoti [0-1000000]"); if(pInfo[playerid][Admin] == 1) format(String, 128, "Administratorius %s padovanojo jums Tasku: %s",PlayerName(playerid), suma); SendClientMessage(zID, RAUDONA, String); SendClientMessage(playerid, COLOR_VIOLET,"* [SYSTEM] Zaidejas sekmingai apdovanotas taskais"); SetPlayerScore(zID, suma); return 1; } COMMAND:freeze(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams."); new zID; if(sscanf(params,"d", zID)) return SendClientMessage(playerid, ERROR, "** Uzsaldyti zaideja: /freeze [zaidejo ID]"); if(zID == INVALID_PLAYER_ID && !IsPlayerNPC(zID)) return SendClientMessage(playerid, ERROR, "** Zaidejo su siuo ID serveryje nera."); if(zID == playerid) return SendClientMessage(playerid, ERROR, " Saves negali uzsaldyti"); new String[128]; if(pInfo[playerid][Admin] == 1) format(String, 128, "* Administratorius %s uzsalde jus",PlayerName(playerid)); SendClientMessage(zID, RAUDONA, String); SendClientMessage(playerid, COLOR_VIOLET,"* [SYSTEM] Zaidejas sekmingai uzsaldytas"); TogglePlayerControllable(zID,0); return 1; } COMMAND:unfreeze(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams."); new zID; if(sscanf(params,"d", zID)) return SendClientMessage(playerid, ERROR, "** Atsaldyti zaideja: /unfreeze [zaidejo ID]"); if(zID == INVALID_PLAYER_ID && !IsPlayerNPC(zID)) return SendClientMessage(playerid, ERROR, "** Zaidejo su siuo ID serveryje nera."); if(zID == playerid) return SendClientMessage(playerid, ERROR, " Saves negali atsaldyti"); new String[128]; if(pInfo[playerid][Admin] == 1) format(String, 128, "* Administratorius %s atsilde jus",PlayerName(playerid)); SendClientMessage(zID, RAUDONA, String); SendClientMessage(playerid, COLOR_VIOLET,"* [SYSTEM] Zaidejas sekmingai atsaldytas"); TogglePlayerControllable(zID,1); return 1; } COMMAND:duotigun(playerid, params[]) { if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, ERROR, "** Si komanda skirta tik administratoriams."); new zID, gunid, ammo; if(sscanf(params,"ddd", zID, gunid, ammo)) return SendClientMessage(playerid, ERROR, "** Duoti ginkla: /duotigun [zaidejo ID][gun ID][ammo]"); if(zID == INVALID_PLAYER_ID && !IsPlayerNPC(zID)) return SendClientMessage(playerid, ERROR, "** Zaidejo su siuo ID serveryje nera."); if(zID == playerid) return SendClientMessage(playerid, ERROR, " Saves negali atsaldyti"); if(!CheckValidGunid(gunid)) return SendClientMessage(playerid, ERROR, "** Tokio gunID nera [0-34]"); if(!CheckValidAmmo(ammo)) return SendClientMessage(playerid, ERROR, "** Tiek amunicijos negali duoti [1-1000]"); new String[128]; if(pInfo[playerid][Admin] == 1) format(String, 128, "* Administratorius %s isdave jums ginklo ID: %d ir ammo %d",PlayerName(playerid), gunid, ammo); SendClientMessage(zID, RAUDONA, String); SendClientMessage(playerid, COLOR_VIOLET,"* [SYSTEM] Zaidejui sekmingai suteikti ginklai"); GivePlayerWeapon(zID, gunid, ammo); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if (pickupid == bankiejimas) { SetPlayerInterior(playerid, 12); SetPlayerPos(playerid,2324.33,-1144.79,1050.71); } else if (pickupid == bankisejimas) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,-2765.9819,375.8284,6.3347); } return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new pFile[128], pIP[16], w[128], gw[128]; GetPlayerIp(playerid, pIP, sizeof(pIP)); format(pFile, sizeof(pFile), "users/%s.ini", PlayerName(playerid)); if(dialogid == 1) { if(response == 1) { if(strlen(inputtext)) { if(dini_Exists(pFile)) { SendClientMessage(playerid, COLOR_RED, "* [SYSTEM]: Tu jau esi uzsiregistraves !"); } else { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); dini_Create(pFile); dini_Set(pFile, "PlayerName", PlayerName(playerid)); dini_Set(pFile, "PlayerIP", pIP); dini_IntSet(pFile, "PasswordHash", udb_hash(inputtext)); dini_IntSet(pFile, "Admin", 0); dini_IntSet(pFile, "Pinigai", 0); dini_IntSet(pFile, "Taskai", 0); dini_IntSet(pFile, "Mirtys", 0); dini_IntSet(pFile, "Nuzudymai", 0); dini_IntSet(pFile, "Banke", 0); SendClientMessage(playerid, COLOR_GREEN, "* [SYSTEM]: Tavo saskaita sukurta !"); format(w,sizeof(w),"Prasome prisijungti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas",w,"Prisijungti","Atmesti"); } } else { SendClientMessage(playerid, COLOR_RED, "* [SYSTEM]: Tu neirasiai slaptazodzio !"); format(gw,sizeof(gw),"Prasome uzsiregistruoti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Registracija",gw,"Registruotis","Atmesti"); } } if(response == 0) { format(w,sizeof(w),"Prasome uzsiregistruoti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Registracija",w,"Registruotis","Atmesti"); } } if(dialogid == 2) { if(response == 1) { if(strlen(inputtext)) { format(pFile, sizeof(pFile), "users/%s.ini", PlayerName(playerid)); new pass[256]; pass = dini_Get(pFile, "PasswordHash"); if(udb_hash(inputtext) != strval(pass)) { SendClientMessage(playerid, COLOR_RED, "* [SYSTEM]: Neteisingas slaptazodis !"); format(w,sizeof(w),"Prasome prisijungti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas",w,"Prisijungti","Atmesti"); } else { PlayerPlaySound(playerid,1057,0.0,0.0,0.0); if(dini_Int(pFile,"Admin") == 0){pInfo[playerid][Admin]=false;} if(dini_Int(pFile,"Admin") == 1){pInfo[playerid][Admin]=true;} pInfo[playerid][Money] = dini_Int(pFile, "Pinigai"); pInfo[playerid][Taskai] = dini_Int(pFile, "Taskai"); pInfo[playerid][Mirtys] = dini_Int(pFile, "Mirtys"); pInfo[playerid][Killai] = dini_Int(pFile, "Nuzudymai"); pInfo[playerid][Bank] = dini_Int(pFile, "Banke"); GivePlayerMoney(playerid, pInfo[playerid][Money]); SetPlayerScore(playerid, pInfo[playerid][Taskai]); SendClientMessage(playerid, COLOR_GREEN, "* [SYSTEM]: Sekmingai prisijungta !"); } } else { SendClientMessage(playerid, COLOR_RED, "* [SYSTEM]: Tu neirasiai slaptazodzio !"); format(w,sizeof(w),"Prasome prisijungti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas",w,"Prisijungti","Atmesti"); } } if(response == 0) { format(w,sizeof(w),"Prasome prisijungti, kad galetumete zaisti.",PlayerName(playerid)); ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas",w,"Prisijungti","Atmesti"); } } return 0; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } stock CheckValidLT(suma) { if(suma > 0 && suma < 1000001) { return true; } return 0; } stock CheckValidGunid(gunid) { if(gunid > 0 && gunid < 35) { return true; } return 0; } stock CheckValidAmmo(ammo) { if(ammo > 1 && ammo < 1001) { return true; } return 0; }
http://www63.zippyshare.com/v/20290067/file.html