Jump to content

Search the Community

Showing results for tags 'scripting'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • SA-MP General
    • Noutăţi şi Actualizări
    • Comunitatea SA:MP România
    • General
    • Suport Client
    • Imagini şi Videoclipuri
  • SA-MP Server
    • Publicitate Server
    • Suport Servere
  • SA-MP Scripting şi Pluginuri
    • Ajutor Scripting
    • Gamemode-uri
    • Filterscript-uri
    • Pluginuri
  • SA-MP Altele
    • Totul şi Nimic
    • Anunţuri
  • A/D TDM's Topicuri

Categories

  • SA-MP
  • Site

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


Discord


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Name in game

Found 24 results

  1. Bun deci lucrez la un gm de la 0 si am intampiat erorile astea, si sunt la inceput cu scripting-ul... C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : error 037: invalid string (possibly non-terminated string) C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : error 017: undefined symbol "Admin" C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : error 017: undefined symbol "level" C:\Users\Acer\Desktop\GamemodeDeLa0\gamemodes\eureka.pwn(530) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors. Gamemode // Tranium RPG - Summer Project // Started on: 01.06.2017 (by AlexandruBHD) // Edited by - /* =================================================================== ----------------------- Informations ----------------------- =================================================================== // Group Types type 1: Police type 2: Hitman type 3: Gangs */ #define MAILER_URL "l0k3d-demo.tk/mail.php" #include <a_samp> #include <a_mysql> #include <fixes> #include <foreach> #include <sscanf2> #include <streamer> #include <regex> #include <YSI\y_master> #include <YSI\y_commands> #include <YSI\y_timers> #include <YSI\y_iterate> #include <YSI\y_stringhash> #include <YSI\y_bit> #include <define> #include <fly> #include <sendmail> #include <mSelection> // Natives native WP_Hash(buffer[], len, const str[]); // MySQL Configuration new handle, rows, fields; new BitArray:pLogged<MAX_PLAYERS>, BitArray:flyingStatus<MAX_PLAYERS>, loginTries[MAX_PLAYERS], playerHashedPass[MAX_PLAYERS][129], enteredCode[MAX_PLAYERS] ; new para, para2, strPara[30], gMsg[128] ; new Text:Logo[2], PlayerText:SkinLogo[MAX_PLAYERS], Text:ClockTime, Text:ClockDate ; new Iterator:Admins<MAX_PLAYERS> ; enum playerInfo { pSQLID, pName[MAX_PLAYER_NAME + 1], pPassword[130], pSerialCode[41], pSkin, pLevel, pAdmin, pAge, pSex, pEmail[100], pCash, pBank, pMember, pRank }; new pInfo[MAX_PLAYERS][playerInfo]; enum groupInfo { gID, gName[50], gMotd[128], Float:geX, Float:geY, Float:geZ, Float:giX, Float:giY, Float:giZ, gRankname1[20], gRankname2[20], gRankname3[20], gRankname4[20], gRankname5[20], gRankname6[20], gRankname7[20], gType, gInterior, gDoor, gLeadskin, gPickup, Text3D:gLabel }; new gInfo[MAX_GROUPS][groupInfo]; enum vehInfo { vID, vModel, vGroup, vColor1, vColor2, vCarPlate[11], Float:vX, Float:vY, Float:vZ, Float:vA }; new vInfo[MAX_VEHICLES][vehInfo], vehID[MAX_VEHICLES]; main() { print("\n----------------------------------"); print(" Tranium RPG Gamemode by AlexandruBHD "); print("----------------------------------\n"); } //timers task OneSecond[1000]() { new hour, minutes, seconds, day, month, year, mstr[20]; gettime(hour, minutes, seconds), getdate(year, month, day); format(gMsg, 128,"%02d:%02d", hour, minutes), TextDrawSetString(ClockTime, gMsg); switch(month) { case 1: mstr="january"; case 2: mstr="february"; case 3: mstr="march"; case 4: mstr="april"; case 5: mstr="may"; case 6: mstr="june"; case 7: mstr="iuly"; case 8: mstr="august"; case 9: mstr="september"; case 10: mstr="octomber"; case 11: mstr="november"; case 12: mstr="december"; } format(gMsg, 128,"%02d %s %02d", day, mstr, year), TextDrawSetString(ClockDate, gMsg); foreach(new x: Player) { ResetPlayerMoney(x), GivePlayerMoney(x, pInfo[x][pCash]); } } task FiveMinutes[1000 * (60*5)]() { for(new v; v < MAX_VEHICLES; v++) { if(vInfo[v][vID] > 0 ) { saveVeh(v); } } for(new i; i < MAX_GROUPS; i++) { saveGroup(i); } foreach(new p : Player) { saveAccount(p); } sendAdmins(COLOR_RED, "AdmData: "WHITE"Toate datele server-ului au fost salvate."); } timer kickTimer[500](playerid) { Kick(playerid); } timer securityKick[1000 * 120](playerid) { if(enteredCode[playerid] == 0) { Kick(playerid); } } timer setVehicleZAngle[700](vehicleid) { SetVehicleZAngle(vehicleid, vInfo[vehID[vehicleid]][vA]); } public OnGameModeInit() { handle = mysql_connect("localhost", "root", "eureka", ""); if(handle && mysql_errno(handle) == 0) { print("[MYSQL] Baza de date sa conectat cu succes!"); } else print("[MYSQL] Connection not found."); mysql_tquery(handle, "SELECT * FROM `groups`", "loadGroups", ""); mysql_tquery(handle, "SELECT * FROM `cars`", "loadCars", ""); EnableStuntBonusForAll(0); ShowPlayerMarkers(0); UsePlayerPedAnims(); DisableInteriorEnterExits(); SendRconCommand("language English"); SetGameModeText("E:RPG v1"); Logo[0] = TextDrawCreate(638.400085, 431.573303, "tranium"); TextDrawLetterSize(Logo[0], 0.354799, 1.704532); TextDrawAlignment(Logo[0], 3); TextDrawColor(Logo[0], -1); TextDrawSetShadow(Logo[0], 0); TextDrawSetOutline(Logo[0], 1); TextDrawBackgroundColor(Logo[0], 51); TextDrawFont(Logo[0], 3); TextDrawSetProportional(Logo[0], 1); Logo[1] = TextDrawCreate(602.000915, 423.359893, "rpg"); TextDrawLetterSize(Logo[1], 0.161597, 0.975287); TextDrawAlignment(Logo[1], 1); TextDrawColor(Logo[1], -1); TextDrawSetShadow(Logo[1], 0); TextDrawSetOutline(Logo[1], 1); TextDrawBackgroundColor(Logo[1], 51); TextDrawFont(Logo[1], 2); TextDrawSetProportional(Logo[1], 1); ClockTime = TextDrawCreate(577.599548, 21.653348, "23:45"); TextDrawLetterSize(ClockTime, 0.449999, 1.600000); TextDrawAlignment(ClockTime, 2); TextDrawColor(ClockTime, -1); TextDrawSetShadow(ClockTime, 0); TextDrawSetOutline(ClockTime, 1); TextDrawBackgroundColor(ClockTime, 51); TextDrawFont(ClockTime, 3); TextDrawSetProportional(ClockTime, 1); ClockDate = TextDrawCreate(579.200256, 7.466676, "23 octombrie 2017"); TextDrawLetterSize(ClockDate, 0.177200, 1.712000); TextDrawAlignment(ClockDate, 2); TextDrawColor(ClockDate, -1); TextDrawSetShadow(ClockDate, 0); TextDrawSetOutline(ClockDate, 1); TextDrawBackgroundColor(ClockDate, 51); TextDrawFont(ClockDate, 2); TextDrawSetProportional(ClockDate, 1); return 1; } public OnGameModeExit() { for(new v; v < MAX_VEHICLES; v++) { if(vInfo[v][vID] > 0 ) { saveVeh(v); } } for(new i; i < MAX_GROUPS; i++) { saveGroup(i); } foreach(new p : Player) { saveAccount(p); } mysql_close(handle); return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, -1410.8655,-298.9116,14.1484); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; } public OnPlayerConnect(playerid) { new query[128]; mysql_format(handle, query, 128, "SELECT * FROM `players` WHERE `username` = '%e'", GetName(playerid)); mysql_tquery(handle, query, "accountCheck", "i", playerid); // create td SkinLogo[playerid] = CreatePlayerTextDraw(playerid, 532.599975, 405.319976, "LD_SPAC:white"); PlayerTextDrawLetterSize(playerid, SkinLogo[playerid], 0.000000, 0.000000); PlayerTextDrawTextSize(playerid, SkinLogo[playerid], 110.0, 110.0); PlayerTextDrawBoxColor(playerid, SkinLogo[playerid], 0xFFFFFF00); PlayerTextDrawBackgroundColor(playerid, SkinLogo[playerid], 0xFFFFFF00); PlayerTextDrawAlignment(playerid, SkinLogo[playerid], 1); PlayerTextDrawColor(playerid, SkinLogo[playerid], -1); PlayerTextDrawSetShadow(playerid, SkinLogo[playerid], 0); PlayerTextDrawSetOutline(playerid, SkinLogo[playerid], 0); PlayerTextDrawFont(playerid, SkinLogo[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW); PlayerTextDrawSetPreviewRot(playerid, SkinLogo[playerid], 0.000000, 0.000000, -340.000000, 1.000000); PlayerTextDrawSetPreviewModel(playerid, SkinLogo[playerid], SPAWN_SKIN); //show td PlayerTextDrawShow(playerid, SkinLogo[playerid]); TextDrawShowForPlayer(playerid, Logo[0]), TextDrawShowForPlayer(playerid, Logo[1]); TextDrawShowForPlayer(playerid, ClockTime), TextDrawShowForPlayer(playerid, ClockDate); SetSpawnInfo(playerid, 0, 0, 725.6906,-1450.2246,17.6953, 359.4464, 0,0,0,0, 0, 0 ); InitFly(playerid); return 1; } public OnPlayerDisconnect(playerid, reason) { // iterate if(pInfo[playerid][pAdmin] > 0) { Iter_Remove(Admins, playerid); } saveAccount(playerid); resetData(playerid); return 1; } // Login forward accountCheck(playerid); public accountCheck(playerid) { TogglePlayerSpectating(playerid, 1); cache_get_data(rows, fields, handle); if(rows) { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", ""SYN"Bine ai revenit pe "CREM"Tranium RPG"SYN"!\n\nAcest cont este inregistrat deja.\nIntrodu parola pentru a te loga pe contul tau.", "Login", "Cancel"); GameTextForPlayer(playerid, "~y~CONT INREGISTRAT", 5000, 4); } else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "SERVER: Register", ""SYN"Bine ai venit pe "CREM"Tranium RPG"SYN"!\n\nAcest cont nu este inregistrat, introdu parola pentru a te inregistra pe server.", "Register", "Cancel"); GameTextForPlayer(playerid, "~y~CONT NEINREGISTRAT", 5000, 4); } InterpolateCameraPos(playerid, 2062.878906, 988.830627, 11.947507, 2022.668579, 1397.960937, 27.489007, 20000); InterpolateCameraLookAt(playerid, 2063.091552, 993.787048, 12.570880, 2022.038208, 1402.912109, 27.785707, 10000); return 1; } forward accountLogin(playerid); public accountLogin(playerid) { cache_get_data(rows, fields, handle); if(rows) { pInfo[playerid][pSQLID] = cache_get_field_content_int(0, "ID"); cache_get_field_content(0, "username", pInfo[playerid][pName], handle, MAX_PLAYER_NAME + 1); cache_get_field_content(0, "SerialCode", pInfo[playerid][pSerialCode], handle, 41); cache_get_field_content(0, "password", pInfo[playerid][pPassword], handle, 129); cache_get_field_content(0, "Email", pInfo[playerid][pEmail], handle, 100); pInfo[playerid][pLevel] = cache_get_field_content_int(0, "Level"); pInfo[playerid][pAdmin] = cache_get_field_content_int(0, "AdminLevel"); pInfo[playerid][pCash] = cache_get_field_content_int(0, "Cash"); pInfo[playerid][pAge] = cache_get_field_content_int(0, "Age"); pInfo[playerid][pSex] = cache_get_field_content_int(0, "Sex"); pInfo[playerid][pBank] = cache_get_field_content_int(0, "Bank"); pInfo[playerid][pMember] = cache_get_field_content_int(0, "Member"); pInfo[playerid][pRank] = cache_get_field_content_int(0, "Rank"); pInfo[playerid][pSkin] = cache_get_field_content_int(0, "Skin"); Clearchat(playerid, 20), SCM(playerid, COLOR_LIGHT, "SERVER: "WHITE"Bine ai revenit, distractie placuta!"); if(pInfo[playerid][pMember]) { SCMEx(playerid, COLOR_TEAL, "Group motd: "GREY"%s", gInfo[pInfo[playerid][pMember]][gMotd]); } if(pInfo[playerid][pAdmin] > 0) { Iter_Add(Admins, playerid); } new serial[41], query[100]; gpci(playerid, serial, 41); if(strcmp(pInfo[playerid][pSerialCode], serial, false)) { new str[200], randCod[10]; format(randCod, 10, randomString(10)); mysql_format(handle, query, 256, "INSERT INTO `accounts_blocked` (`playerID`, `time`, `securityCode`) VALUES ('%d', '%d', '%e')", pInfo[playerid][pSQLID], GetTickCount(), randCod); mysql_tquery(handle, query, "", ""); format(str, 384, "Hello %s!\nYou received this email because you logged in on your account from a different location.\nUse this code to continue the game: %s", GetName(playerid), randCod); SendMail(pInfo[playerid][pEmail], "[email protected]", "Tranium RPG", "Security code!", str); ShowPlayerDialog(playerid, DIALOG_BLOCK, DIALOG_STYLE_PASSWORD, "SERVER: Account blocked", ""SYN"This account is "DRED"blocked "SYN"because you are logged in from a different location.\n\nTo unblock your account you need to use a security cod, sended to your email.\nYou have "CREM"2 minutes "SYN"to use it.", "Proceed", "Cancel"); defer securityKick(playerid); } Bit_Set(pLogged, playerid, true); TogglePlayerSpectating(playerid, 0); SetPlayerScore(playerid, pInfo[playerid][pLevel]); SpawnPlayer(playerid); } else { if(2-loginTries[playerid] != 0) { loginTries[playerid] ++; SCMEx(playerid, COLOR_DRED, "You have %d attempts to login, otherwise you will be kicked from the server.", 3-loginTries[playerid]); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "SERVER: Login", ""SYN"Bine ai revenit pe "CREM"Tranium RPG"SYN"!\n\nAcest cont este deja inregistrat.\nTe rugam sa introduci parola "DRED"corecta"SYN" pentru a te loga pe contul tau.", "Login", "Cancel"); } else ShowPlayerDialog(playerid, DIALOG_GENERAL, DIALOG_STYLE_MSGBOX, "SERVER: Parola Gresita", "Ai primit kick deoarece ai gresit parola de 3 ori.", "Okay", ""), defer kickTimer(playerid); } return 1; } // Load Data forward loadGroups(); public loadGroups() { cache_get_data(rows, fields); if(rows) { new id, pickup; for(new i; i < rows; i++) { id = cache_get_field_content_int(i, "id"); gInfo[id][gID] = id; cache_get_field_content(i, "Name", gInfo[id][gName], handle, 50); cache_get_field_content(i, "Motd", gInfo[id][gMotd], handle, 128); cache_get_field_content(i, "rankName1", gInfo[id][gRankname1], handle, 20); cache_get_field_content(i, "rankName2", gInfo[id][gRankname2], handle, 20); cache_get_field_content(i, "rankName3", gInfo[id][gRankname3], handle, 20); cache_get_field_content(i, "rankName4", gInfo[id][gRankname4], handle, 20); cache_get_field_content(i, "rankName5", gInfo[id][gRankname5], handle, 20); cache_get_field_content(i, "rankName6", gInfo[id][gRankname6], handle, 20); cache_get_field_content(i, "rankName7", gInfo[id][gRankname7], handle, 20); gInfo[id][geX] = cache_get_field_content_float(i, "eX"); gInfo[id][geY] = cache_get_field_content_float(i, "eY"); gInfo[id][geZ] = cache_get_field_content_float(i, "eZ"); gInfo[id][giX] = cache_get_field_content_float(i, "iX"); gInfo[id][giY] = cache_get_field_content_float(i, "iY"); gInfo[id][giZ] = cache_get_field_content_float(i, "iZ"); gInfo[id][gType] = cache_get_field_content_int(i, "Type"); gInfo[id][gInterior] = cache_get_field_content_int(i, "Interior"); gInfo[id][gDoor] = cache_get_field_content_int(i, "Door"); gInfo[id][gLeadskin] = cache_get_field_content_int(i, "leadSkin"); format(gMsg, 128, "{FF6347}%s`s HQ\n{D2B48C}(%s)", gInfo[id][gName], (gInfo[id][gDoor]) ? ("closed") : ("opened")); if(gInfo[id][gType] == 1) { pickup = 1247; } else if(gInfo[id][gType] == 2) { pickup = 1254; } else { pickup = 1239; } gInfo[id][gPickup] = CreateDynamicPickup(pickup, 1, gInfo[id][geX], gInfo[id][geY], gInfo[id][geZ], -1, -1, -1, 20.0); gInfo[id][gLabel] = CreateDynamic3DTextLabel(gMsg, COLOR_YELLOW, gInfo[id][geX], gInfo[id][geY], gInfo[id][geZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0); } } else print("No groups."); return 1; } forward loadCars(); public loadCars() { cache_get_data(rows, fields, handle); if(rows) { for(new x = 0; x < rows; x++) { new i = cache_get_field_content_int(x, "id"); vInfo[vID] = i; vInfo[vModel] = cache_get_field_content_int(x, "Model"); vInfo[vGroup] = cache_get_field_content_int(x, "Group"); vInfo[vX] = cache_get_field_content_float(x, "pX"); vInfo[vY] = cache_get_field_content_float(x, "pY"); vInfo[vZ] = cache_get_field_content_float(x, "pZ"); vInfo[vA] = cache_get_field_content_float(x, "pA"); cache_get_field_content(x, "CarPlate", vInfo[vCarPlate], handle, 11); vInfo[vColor1] = cache_get_field_content_int(x, "Color1"); vInfo[vColor2] = cache_get_field_content_int(x, "Color2"); new car = CreateVehicle(vInfo[vModel], vInfo[vX], vInfo[vY], vInfo[vZ], vInfo[vA], vInfo[vColor1], vInfo[vColor2], -1); vehID[car] = vInfo[vID]; SetVehicleNumberPlate(car, vInfo[vCarPlate]); } } else print("No cars."); return 1; } forward saveGroup(id); public saveGroup(id) { new query[500]; mysql_format(handle, query, 500, "UPDATE `groups` SET `Name` = '%s', `Motd` = '%s', `eX` = '%f', `eY` = '%f', `eZ` = '%f', `iX` = '%f', `iY` = '%f', `iZ` = '%f', `rankName1` = '%s', `rankName2` = '%s', `rankName3` = '%s', `rankName4` = '%s', `rankName5` = '%s', `rankName6` = '%s', `rankName7` = '%s', `Type` = '%d', `Interior` = '%d', `Door` = '%d', `leadSkin` = '%d' WHERE `id` = '%d'", gInfo[id][gName], gInfo[id][gMotd], gInfo[id][geX], gInfo[id][geY],gInfo[id][geZ], gInfo[id][giX], gInfo[id][giY], gInfo[id][giZ], gInfo[id][gRankname1], gInfo[id][gRankname2], gInfo[id][gRankname3], gInfo[id][gRankname4], gInfo[id][gRankname5], gInfo[id][gRankname6], gInfo[id][gRankname7], gInfo[id][gType], gInfo[id][gInterior], gInfo[id][gDoor], gInfo[id][gLeadskin], id); mysql_tquery(handle, query, "", ""); return 1; } forward saveVeh(car); public saveVeh(car) { new query[500]; mysql_format(handle, query, 500, "UPDATE `cars` SET `Model` = '%d', `Group` = '%d', `CarPlate` = '%e', `pX` = '%f', `pY` = '%f', `pZ` = '%f', `pA` = '%f', `Color1` = '%d', `Color2` = '%d' WHERE `id` = '%d'", vInfo[car][vModel], vInfo[car][vGroup], vInfo[car][vCarPlate], vInfo[car][vX], vInfo[car][vY], vInfo[car][vZ], vInfo[car][vA], vInfo[car][vColor1], vInfo[car][vColor2], car); mysql_tquery(handle, query, "", ""); return 1; } forward saveAccount(playerid); public saveAccount(playerid) { new query[500]; // mysql_format(handle, query, 500, "UPDATE `players` SET `username` = '%e', `Level` = '%d', `Email` = '%e', `AdminLevel` = '%d', `Member` = '%d', `Rank` = '%d', `Skin` = '%d' WHERE `ID` = '%d'", // pInfo[playerid][pName], pInfo[playerid][pLevel], pInfo[playerid][pEmail], pInfo[playerid][pAdmin], pInfo[playerid][pMember], pInfo[playerid] mysql_format(handle, query, 500, "UPDATE `players` SET `username` = '%e', `Level` = '%d', `Email` = '%e', `AdminLevel` = '%d', `Member` = '%d', `Rank` = '%d', `Skin` = '%d', `Cash` = '%d', `Bank` = '%d' WHERE `ID` = '%d'", pInfo[playerid][pName], pInfo[playerid][pLevel], pInfo[playerid][pEmail], pInfo[playerid][pAdmin], pInfo[playerid][pMember], pInfo[playerid][pRank], pInfo[playerid][pSkin], pInfo[playerid][pCash], pInfo[playerid][pBank], pInfo[playerid][pSQLID]); mysql_tquery(handle, query, "", ""); return 1; } forward securityCodeCheck(playerid); public securityCodeCheck(playerid) { cache_get_data(rows, fields, handle); if(rows) { SCM(playerid, COLOR_LIGHTRED, "You have entered the correct code, now you can play!"), enteredCode[playerid] = 1; } else ShowPlayerDialog(playerid, DIALOG_BLOCK, DIALOG_STYLE_PASSWORD, "SERVER: Account blocked", ""SYN"You used a "DRED"incorrect code"SYN", try again.\n\nTo unblock your account you need to use a security cod, sended to your email.\nYou have "CREM"2 minutes "SYN"to use it.", "Proceed", "Cancel"); return 1; } public OnPlayerSpawn(playerid) { if(Bit_Get(pLogged, playerid) == true) { SetPlayerHealth(playerid, 99.00); SetPlayerArmour(playerid, 00.00); SetPlayerSkin(playerid, pInfo[playerid][pSkin]); if(pInfo[playerid][pMember] == 0) { SetPlayerPos(playerid, 725.6906,-1450.2246,17.6953), SetPlayerFacingAngle(playerid, 359.4464); SetPlayerInterior(playerid, 0), SetPlayerVirtualWorld(playerid, 0), SetCameraBehindPlayer(playerid); } else { new i = pInfo[playerid][pMember]; SetPlayerPos(playerid, gInfo[giX], gInfo[giY], gInfo[giZ]); SetPlayerInterior(playerid, gInfo[gInterior]); SetPlayerVirtualWorld(playerid, i+1); SetCameraBehindPlayer(playerid); } } return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { if(vInfo[vehID[vehicleid]][vID] > 0) { ChangeVehicleColor(vehicleid, vInfo[vehID[vehicleid]][vColor1],vInfo[vehID[vehicleid]][vColor2]); SetVehiclePos(vehicleid, vInfo[vehID[vehicleid]][vX], vInfo[vehID[vehicleid]][vY], vInfo[vehID[vehicleid]][vZ]); defer setVehicleZAngle(vehicleid); } return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { format(gMsg, 128, "%s: %s", GetName(playerid), text); SendClientMessageToAll(-1, gMsg); SetPlayerChatBubble(playerid, text, COLOR_GREY, 10.0, 10000); return 0; } public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if (success) return 1; if(!success) return SCMEx(playerid, COLOR_LIGHT, "SERVER: This command ("TEAL"%s"SYN") does not exist.", cmdtext); return 0; } YCMD:ah(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); SCM(playerid, COLOR_TEAL, "----------------------------- Admins Commands-----------------------------"); SCM(playerid, -1, "Admin level 1: /a /vr /vehinfo /gotoveh /gotohq /gotopoint /fly /stopfly /gotods /tbox"); SCM(playerid, -1, "Admin level 2: /moveveh"); SCM(playerid, -1, "Admin level 3: /setleader /groupveh /modelveh /colorveh"); SCM(playerid, -1, "Admin level 4: /sethqint /sethqext"); SCM(playerid, -1, "Admin level 5: /none); SCM(playerid, -1, "Admin level 6: /addvehicle /setadmin "); SCM(playerid, COLOR_TEAL, "---------------------------------------------------------------------------"); return 1; } YCMD:pset(playerid, params[], help) { if(sscanf(params, "us[30]i", para, strPara, para2)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/pset [playerid] [item] [value]"), SCM(playerid, -1, "Items: rank, group, money, bank (moeny)"); switch(YHash(strPara)) { case _H<rank>: { if(para2 < 0 || para2 > 7) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/pset [playerid] [rank] [0-7]"); format(gMsg, 128, "/pset: Admin %s changed %s`s rank to %d.", GetName(playerid), GetName(para), para2), sendAdmins(COLOR_YELLOW, gMsg); SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your rank to %d.", GetName(para), para2); pInfo[para][pRank] = para2; } case _H<group>: { if(gInfo[para2][gID] == 0 && para2 != 0) return SCM(playerid, COLOR_LIGHT, "Error: Invalid group id."); format(gMsg, 128, "/pset: Admin %s changed %s`s group to %s (id: %d).", GetName(playerid), GetName(para), gInfo[para2][gName], para2), sendAdmins(COLOR_YELLOW, gMsg); SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your group to %s.", GetName(para), gInfo[para2][gName]); pInfo[para][pMember] = para2, pInfo[para][pRank] = (para2 == 0) ? (0) : (1); } case _H<money>: { format(gMsg, 128, "/pset: Admin %s changed %s`s money to $%s.", GetName(playerid), GetName(para), FormatNumber(para2)), sendAdmins(COLOR_YELLOW, gMsg); SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your money to $%s.", GetName(para), FormatNumber(para2)); pInfo[para][pCash] = para2; } case _H<bank>: { format(gMsg, 128, "/pset: Admin %s changed %s`s bank money to $%s.", GetName(playerid), GetName(para), FormatNumber(para2)), sendAdmins(COLOR_YELLOW, gMsg); SCMEx(playerid, COLOR_LORANGE, "Admin %s changed your bank money to $%s.", GetName(para), FormatNumber(para2)); pInfo[para][pBank] = para2; } default: { SCM(playerid, COLOR_GREY, "Error: Wrong item."); } } return 1; } YCMD:vr(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); if(IsPlayerInAnyVehicle(playerid)) { SetVehicleToRespawn(GetPlayerVehicleID(playerid)); SCMEx(playerid, -1, ""NON"You succesfull respawned vehicle #%d.", GetPlayerVehicleID(playerid)); } else { if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/vr [vehicle id]"); SetVehicleToRespawn(para); SCMEx(playerid, -1, ""NON"You succesfull respawned vehicle #%d.", para); } return 1; } YCMD:addvehicle(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 6) return adminOnly(playerid, 6); new str[284], Cache:cache_i; if(GetPVarInt(playerid, "AddVehicle") > 0) { new Float:x, Float:y, Float:z, Float:a; GetVehiclePos(GetPVarInt(playerid, "AddVehicle"), x, y, z), GetVehicleZAngle(GetPVarInt(playerid, "AddVehicle"), a); mysql_format(handle, str, 284, "INSERT INTO `cars` (`Model`, `Group`, `CarPlate`, `pX`, `pY`, `pZ`, `pA`, `Color1`, `Color2`) VALUES ('%d', '0', 'Null', '%f', '%f', '%f', '%f', '-1', '-1')", GetVehicleModel(GetPVarInt(playerid, "AddVehicle")), x, y, z, a); cache_i = mysql_query(handle, str); new id = cache_insert_id(); GetVehiclePos(GetPVarInt(playerid, "AddVehicle"), x, y, z), GetVehicleZAngle(GetPVarInt(playerid, "AddVehicle"), a); vInfo[id][vID] = id; vInfo[id][vModel] = GetVehicleModel(GetPVarInt(playerid, "AddVehicle")); vInfo[id][vX] = x, vInfo[id][vY] = y, vInfo[id][vZ] = z, vInfo[id][vA] = a; vInfo[id][vGroup] = 0; vInfo[id][vColor1] = vInfo[id][vColor2] = -1; format(vInfo[id][vCarPlate], 11, "Null"); vehID[GetPVarInt(playerid, "AddVehicle")] = id; SetVehicleToRespawn(GetPVarInt(playerid, "AddVehicle")), DeletePVar(playerid, "AddVehicle"); cache_delete(cache_i); format(str, 100, ""ORANGE"/addvehicle: Admin %s added a new vehicle on server.", GetName(playerid)); sendAdmins(COLOR_WHITE, str); } else { if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "You can use this command because you are in a vehicle."); if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/addvehicle [model]"); if(para < 400 || para > 612) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/addvehicle [400-612]"); new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z), GetPlayerFacingAngle(playerid, a); new vehicle = CreateVehicle(para,x, y, z, a, -1, -1, -1); PutPlayerInVehicle(playerid, vehicle, 0); SetPVarInt(playerid, "AddVehicle", vehicle); } return 1; } YCMD:colorveh(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3); if(sscanf(params, "ii", para, para2)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/colorveh "); new i = GetPlayerVehicleID(playerid); if(i) { if((para < 0 || para > 256) || (para2 < 0 || para2 > 256)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/colorveh "); vInfo[vehID][vColor1] = para, vInfo[vehID][vColor2] = para2; ChangeVehicleColor(i, para, para2); SCMEx(playerid, -1, ""NON"You succesfull changed vehicle colors to %d and %d (for vehicle #%d).", para, para2, i); } else SCM(playerid, -1, "You are not in a vehicle."); return 1; } YCMD:modelveh(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3); if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/modelveh [model]"); new i = GetPlayerVehicleID(playerid); if(i) { if(para < 400 || para > 612) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/modelveh [400-612]"); vInfo[vehID][vModel] = para; DestroyVehicle(i); i = CreateVehicle(vInfo[vehID][vModel], vInfo[vehID][vX], vInfo[vehID][vY], vInfo[vehID][vZ], vInfo[vehID][vA], vInfo[vehID][vColor1], vInfo[vehID][vColor2], -1); PutPlayerInVehicle(playerid, i, 0); SCMEx(playerid, -1, ""NON"You succesfull changed vehicle model (for vehicle #%d).", i); } else SCM(playerid, -1, "You are not in a vehicle."); return 1; } YCMD:groupveh(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3); new veh = GetPlayerVehicleID(playerid); if(veh) { if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/groupveh [group id]"); if(gInfo[para][gID] == 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group id."); vInfo[vehID[veh]][vGroup] = para; SetVehicleToRespawn(veh); SCMEx(playerid, COLOR_NON, "Now, this %s (id: %d) its %s`s vehicle.", vehName[GetVehicleModel(veh) - 400], veh, gInfo[para][gName]); } else SCM(playerid, -1, "You are not in a vehicle."); return 1; } YCMD:moveveh(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 2) return adminOnly(playerid, 2); new veh = GetPlayerVehicleID(playerid); if(veh) { GetVehiclePos(veh, vInfo[vehID[veh]][vX], vInfo[vehID[veh]][vY], vInfo[vehID[veh]][vZ]); GetVehicleZAngle(veh, vInfo[vehID[veh]][vA]); SetVehicleToRespawn(veh); SCMEx(playerid, COLOR_NON, "You succesfull moved this %s (id: %d)!", vehName[GetVehicleModel(veh) - 400], veh); } else SCM(playerid, -1, "You are not in a vehicle."); return 1; } YCMD:vehinfo(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/vehinfo [veh id]"); SCMEx(playerid, COLOR_TEAL, ""TEAL"Model: "WHITE"%d | "TEAL"Carplate: "WHITE"%s | "TEAL"Group: "WHITE"%d | "TEAL"Colors: "WHITE"%d, %d", vInfo[vehID[para]][vModel], vInfo[vehID[para]][vCarPlate], vInfo[vehID[para]][vGroup], vInfo[vehID[para]][vColor1], vInfo[vehID[para]][vColor2]); return 1; } YCMD:fly(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); StartFly(playerid), SetPlayerHealth(playerid, 999999.00); Bit_Set(flyingStatus, playerid, true); return 1; } YCMD:stopfly(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); StopFly(playerid), SetPlayerHealth(playerid, 99.00); Bit_Set(flyingStatus, playerid, false); return 1; } YCMD:gotoveh(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/gotoveh [vehicle id]"); new Float:x, Float:y, Float:z; GetVehiclePos(para, Float:x, Float:y, Float:z), SetPlayerPos(playerid, x, y, z+5), SetPlayerVirtualWorld(playerid, GetVehicleVirtualWorld(para)); return 1; } YCMD:gotopoint(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); new Float:x, Float:y, Float:z; if(sscanf(params, "fffi", x, y, z, para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/gotopoint [x] [y] [z] [interior]"); SetPlayerPos(playerid, x, y, z), SetPlayerInterior(playerid, para), SetCameraBehindPlayer(playerid); return 1; } YCMD:gotohq(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/gotohq [id]"); SetPlayerPos(playerid, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ]); SetPlayerInterior(playerid, 0); SetCameraBehindPlayer(playerid); SCMEx(playerid, -1, "You have teleported to %s`s headquarter.", gInfo[para][gName]); return 1; } YCMD:setadmin(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 6) return adminOnly(playerid, 6); if(sscanf(params, "ui", para, para2)) return SCM(playerid, COLOR_LIGHT, "(SERVER): "WHITE"/setadmin [playerid] [level]"); if(para == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id."); if(pInfo[para][pAdmin] < para2) { SCMEx(para, -1, ""NON"Felicitari! Ai fost promovat/a la admin %d, de catre adminul %s.", para2, GetName(para)); } else if(pInfo[para][pAdmin] > para2 && para2 != 0) { SCMEx(para, -1, ""NON"Adminul %s ti-a dat rank-down la admin %d.", para2, GetName(para)); } else { SCMEx(para, -1, ""NON"You have been removed from Staff Team (administrators), by %s", GetName(para)); } // iterators if(pInfo[para][pAdmin] == 0 && para2 > 0) { Iter_Add(Admins, para); } else if(pInfo[para][pAdmin] > 0 && para2 == 0) { Iter_Remove(Admins, para); } pInfo[para][pAdmin] = para2; SCMEx(playerid, -1, "You have changed %s`s admin level to %d.", GetName(para), para2); return 1; } YCMD:sethqext(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 4) return adminOnly(playerid, 4); if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "(SERVER): "WHITE"/sethqext [group id]"); if(gInfo[para][gID] == 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group ID."); GetPlayerPos(playerid, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ]); DestroyDynamicPickup(gInfo[para][gPickup]); DestroyDynamic3DTextLabel(gInfo[para][gLabel]); format(gMsg, 128, "{FF6347}%s`s HQ\n{D2B48C}(%s)", gInfo[para][gName], (gInfo[para][gDoor]) ? ("closed") : ("opened")); new pickup; if(gInfo[para][gType] == 1) { pickup = 1247; } else if(gInfo[para][gType] == 2) { pickup = 1254; } else { pickup = 1239; } gInfo[para][gPickup] = CreateDynamicPickup(pickup, 1, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ], -1, -1, -1, 20.0); gInfo[para][gLabel] = CreateDynamic3DTextLabel(gMsg, COLOR_YELLOW, gInfo[para][geX], gInfo[para][geY], gInfo[para][geZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0); SCMEx(playerid, COLOR_TEAL, "(!) "WHITE"The exterior of %s (#%d) was changed successfully.", gInfo[para][gName], para); saveGroup(para); return 1; } YCMD:sethqint(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 4) return adminOnly(playerid, 4); if(sscanf(params, "i", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/sethqint [group id]"); if(gInfo[para][gID] == 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group ID."); GetPlayerPos(playerid, gInfo[para][giX], gInfo[para][giY], gInfo[para][giZ]), gInfo[para][gInterior] = GetPlayerInterior(playerid); SCMEx(playerid, COLOR_TEAL, "(!) "WHITE"The interior of %s (#%d) was changed successfully.", gInfo[para][gName], para); saveGroup(para); return 1; } YCMD:auninvite(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 2) return adminOnly(playerid, 2); if(sscanf(params, "us[30]", para, strPara)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/auninvite [playerid] [reason: max 30 characters]"); if(para == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id."); if(pInfo[para][pMember] == 0) return SCM(playerid, COLOR_GREY, "You can not use this command on civilians."); format(gMsg, 128, "%s was uninvited by Admin %s from %s, reason: %s", GetName(para), GetName(playerid), gInfo[pInfo[para][pMember]][gName], strPara); sendGroup(COLOR_LIGHT, pInfo[para][pMember], gMsg); format(gMsg, 128, "Admin uninvite: %s was uninvited by Admin %s from %s, reason: %s", GetName(para), GetName(playerid), gInfo[pInfo[playerid][pMember]][gName], strPara); sendAdmins(COLOR_DRED, gMsg); format(gMsg, 128, "You got uninvited by Admin %s from %s, reason: %s", GetName(playerid), gInfo[pInfo[playerid][pMember]][gName], strPara); ShowPlayerDialog(para, DIALOG_GENERAL, DIALOG_STYLE_MSGBOX, "SERVER: Uninvite", gMsg, "Close", ""); pInfo[para][pMember] = pInfo[para][pRank] = 0; pInfo[para][pSkin] = SPAWN_SKIN, SetPlayerSkin(para, SPAWN_SKIN); return 1; } YCMD:setleader(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 3) return adminOnly(playerid, 3); new p; if(sscanf(params, "ui", p, para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/setleader [playerid] [group id]"); if(p == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id."); if(pInfo[p][pMember] > 0) return SCM(playerid, COLOR_GREY, "This player is already in a faction, you need to use /auninvite first."); if(gInfo[para][gID] == 0 && para != 0) return SCM(playerid, COLOR_GREY, "Error: Invalid group id."); pInfo[p][pMember] = para, pInfo[p][pRank] = 7; SCMEx(playerid, -1, "You have set %s`s leader to %s.", GetName(p), gInfo[para][gName]), SCMEx(p, -1, ""NON"You have been promoted to %s`s leader by %s. Good job!", gInfo[para][gName], GetName(playerid)); SetPlayerSkin(p, gInfo[para][gLeadskin]), pInfo[p][pSkin] = gInfo[para][gLeadskin]; return 1; } YCMD:a(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/a [message]"); format(gMsg, 128, "(/a) %s: %s", GetName(playerid), params); sendAdmins(COLOR_ACHAT, gMsg); return 1; } /////////////////////////////////////// YCMD:invite(playerid, params[], help) { if(pInfo[playerid][pRank] < 6 || pInfo[playerid][pMember] == 0) return SCM(playerid, COLOR_GREY, "You are not allowed to use this command."); if(sscanf(params, "u", para)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/invite [playerid]"); if(para == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Error: Invalid player id."); if(para == playerid) return SCM(playerid, COLOR_GREY, "You can not invite yourself."); if(pInfo[para][pMember] > 0) return SCM(playerid, COLOR_GREY, "You can invite in your group only civilians."); if(GetPVarInt(para, "inviteGroup") == pInfo[playerid][pMember]) return SCM(playerid, COLOR_GREY, "This player is already invited to your group."); SetPVarInt(para, "inviteGroup", pInfo[playerid][pMember]), SetPVarString(para, "inviteName", pInfo[playerid][pName]); SCMEx(playerid, COLOR_NON, "%s was invited, please wait...", GetName(para)); SCMEx(para, COLOR_NON, "You have been invited by %s to join in %s. Type /accept invite to accept.", GetName(playerid), gInfo[pInfo[playerid][pMember]][gName]); return 1; } YCMD:admins(playerid, params[], help) { SCM(playerid, COLOR_TEAL, "---------------------------------------------------------"); foreach(new i : Admins) { SCMEx(playerid, -1, "(%d) %s - admin level %d", i, GetName(i), pInfo[pAdmin]); } SCMEx(playerid, -1, "There are %d %s online. If you have a problem, use report.", Iter_Count(Admins), (Iter_Count(Admins) == 1) ? ("admin") : ("admins")); SCM(playerid, COLOR_TEAL, "---------------------------------------------------------"); return 1; } YCMD:accept(playerid, params[], help) { if(sscanf(params, "s[30]", strPara)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/accept [item]"), SCM(playerid, -1, "Items: invite"); switch(YHash(strPara)) { case _H<invite>: { if(GetPVarInt(playerid, "inviteGroup") == 0) return SCM(playerid, COLOR_GREY, "You haven`t been invited in any group."); new name[MAX_PLAYER_NAME]; pInfo[playerid][pMember] = GetPVarInt(playerid, "inviteGroup"); pInfo[playerid][pRank] = 1, DeletePVar(playerid, "inviteGroup"); pInfo[playerid][pSkin] = gInfo[pInfo[playerid][pMember]][gLeadskin], SetPlayerSkin(playerid, gInfo[pInfo[playerid][pMember]][gLeadskin]); format(gMsg, 128, "%s is now your teammate, invited by %s.", GetName(playerid), GetPVarString(playerid, "inviteName", name, MAX_PLAYER_NAME)); sendGroup(COLOR_LIGHT, pInfo[playerid][pMember], gMsg); format(gMsg, 128, "Congratulations! Now you are %s`s member.", gInfo[pInfo[playerid][pMember]][gName]); ShowPlayerDialog(playerid, DIALOG_GENERAL, DIALOG_STYLE_MSGBOX, "SERVER: Invitation", gMsg, "Close", ""); DeletePVar(playerid, "inviteName"); } default: { SCM(playerid, COLOR_GREY, "Error: Wrong item."); } } return 1; } YCMD:f(playerid, params[], help) { if(pInfo[playerid][pMember] && (gInfo[pInfo[playerid][pMember]][gType] == 3 || gInfo[pInfo[playerid][pMember]][gType] == 2)) { if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/f(action) [message]"); switch(pInfo[playerid][pRank]) { case 1: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname1], GetName(playerid), params); case 2: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname2], GetName(playerid), params); case 3: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname3], GetName(playerid), params); case 4: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname4], GetName(playerid), params); case 5: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname5], GetName(playerid), params); case 6: format(gMsg, 128, "{1BA6C2}* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname6], GetName(playerid), params); case 7: format(gMsg, 128, "{1BA6C2}* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname7], GetName(playerid), params); } sendGroup(COLOR_FCHAT, pInfo[playerid][pMember], gMsg); } return 1; } YCMD:r(playerid, params[], help) { if(pInfo[playerid][pMember] && gInfo[pInfo[playerid][pMember]][gType] == 1) { if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/r(adio) [message]"); switch(pInfo[playerid][pRank]) { case 1: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname1], GetName(playerid), params); case 2: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname2], GetName(playerid), params); case 3: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname3], GetName(playerid), params); case 4: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname4], GetName(playerid), params); case 5: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname5], GetName(playerid), params); case 6: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname6], GetName(playerid), params); case 7: format(gMsg, 128, "* %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname7], GetName(playerid), params); } sendGroup(COLOR_RCHAT, pInfo[playerid][pMember], gMsg); } return 1; } YCMD:d(playerid, params[], help) { if(pInfo[playerid][pMember] && gInfo[pInfo[playerid][pMember]][gType] == 1) { if(isnull(params)) return SCM(playerid, COLOR_LIGHT, "Syntax: "WHITE"/d(epartments) [message]"); switch(pInfo[playerid][pRank]) { case 1: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname1], GetName(playerid), params); case 2: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname2], GetName(playerid), params); case 3: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname3], GetName(playerid), params); case 4: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname4], GetName(playerid), params); case 5: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname5], GetName(playerid), params); case 6: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname6], GetName(playerid), params); case 7: format(gMsg, 128, "** %s %s: %s", gInfo[pInfo[playerid][pMember]][gRankname7], GetName(playerid), params); } sendgType(COLOR_DCHAT, gInfo[pInfo[playerid][pMember]][gType], gMsg); } return 1; } YCMD:stats(playerid, params[], help) { showStats(playerid, playerid); return 1; } YCMD:tbox(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); SetPlayerPos(playerid, 2127.3901,2337.2629,10.8203); SendClientMessage(playerid, -1, "Ai fost teleportat cu succes la giftbox."); return 1; } YCMD:gotods(playerid, params[], help) { if(pInfo[playerid][pAdmin] < 1) return adminOnly(playerid, 1); SetPlayerPos(playerid, 328.4269,-1513.5961,36.0391); SendClientMessage(playerid, -1, "(/gotods) Ai fost teleportat cu succes la dealership."); return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if((vInfo[vehID[vehicleid]][vGroup] > 0 && pInfo[playerid][pMember] != vInfo[vehID[vehicleid]][vGroup]) && pInfo[playerid][pAdmin] == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z), SetPlayerPos(playerid, x, y, z+2); SCMEx(playerid, COLOR_GREY, "This %s can be used only be %s`s members!", vehName[GetVehicleModel(vehicleid) - 400], gInfo[vInfo[vehID[vehicleid]][vGroup]][gName]); } return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { new veh = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER) { new vehicleName[30], rand = random(3); switch(rand) { case 0: { format(vehicleName, 30, "~g~%s", vehName[GetVehicleModel(veh) - 400]); } case 1: { format(vehicleName, 30, "~y~%s", vehName[GetVehicleModel(veh) - 400]); } case 2: { format(vehicleName, 30, "~r~~h~%s", vehName[GetVehicleModel(veh) - 400]); } } GameTextForPlayer(playerid, vehicleName, 3000, 1); if((vInfo[vehID[veh]][vGroup] > 0 && pInfo[playerid][pMember] != vInfo[vehID[veh]][vGroup]) && pInfo[playerid][pAdmin] == 0) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z), SetPlayerPos(playerid, x, y, z+2); SCMEx(playerid, COLOR_GREY, "This %s can be used only be %s`s members!", vehName[GetVehicleModel(veh) - 400], gInfo[vInfo[vehID[veh]][vGroup]][gName]); } } if(newstate != PLAYER_STATE_DRIVER && GetPVarInt(playerid, "AddVehicle") > 0 && veh != GetPVarInt(playerid, "AddVehicle")) { DestroyVehicle(GetPVarInt(playerid, "AddVehicle")); SCMEx(playerid, COLOR_LIGHTRED, "Vehicle #%d was destroyed because you left it.", GetPVarInt(playerid, "AddVehicle")), DeletePVar(playerid, "AddVehicle"); } 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) { 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) { if(newkeys & KEY_SECONDARY_ATTACK) { new Float: X, Float: Y, Float: Z; GetPlayerPos(playerid, X, Y, Z); if(IsPlayerConnected(playerid)) { for(new i = 0; i < MAX_GROUPS; i++) { if(IsPlayerInRangeOfPoint(playerid, 2.0, gInfo[geX], gInfo[geY], gInfo[geZ])) { if(gInfo[gDoor] == 0 || (pInfo[playerid][pMember] == i && gInfo[gDoor] == 1)) { SetPlayerPos(playerid, gInfo[giX], gInfo[giY], gInfo[giZ]); SetPlayerInterior(playerid, gInfo[gInterior]); SetPlayerVirtualWorld(playerid, i+1); SetCameraBehindPlayer(playerid); } else SCMEx(playerid, -1, "You are not %s`s member.", gInfo[gName]); } else if(IsPlayerInRangeOfPoint(playerid, 2.0, gInfo[giX], gInfo[giY], gInfo[giZ])) { SetPlayerPos(playerid, gInfo[geX], gInfo[geY], gInfo[geZ]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); } } } } if((newkeys & KEY_WALK) && (newkeys & KEY_FIRE)) { if(Bit_Get(flyingStatus, playerid) == true) { StopFly(playerid), SetPlayerHealth(playerid, 99.00); Bit_Set(flyingStatus, playerid, false); GameTextForPlayer(playerid, "~~Flying mode off", 4500, 3); } } 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 query[354]; switch(dialogid) { case DIALOG_REGISTER: { if(response) { new serialCode[41]; WP_Hash(playerHashedPass[playerid], 129, inputtext); gpci(playerid, serialCode, 41); mysql_format(handle, query, 354, "INSERT INTO `players` (`username`, `password`, `SerialCode`, `Skin`) VALUES ('%e', '%e', '%e', '%d')", GetName(playerid), playerHashedPass[playerid], serialCode, SPAWN_SKIN); mysql_tquery(handle, query, "", "" ); Clearchat(playerid, 20); SCM(playerid, COLOR_LIGHT, "REGISTER: "WHITE"Your account was been created! You need to finish all registration steps, otherwise it will be deleted."); ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_MSGBOX, "SERVER: Select your character", ""SYN"Please select your "CREM"character"SYN"!", "Male", "Female"); } else Kick(playerid); } case DIALOG_LOGIN: { if(response) { new hashed[129]; WP_Hash(hashed, 129, inputtext ); mysql_format(handle, query, 256, "SELECT * FROM `players` WHERE `username` = '%e' AND `password` = '%e'", GetName(playerid), hashed); mysql_tquery(handle, query, "accountLogin", "i", playerid); } else Kick(playerid); } case DIALOG_SEX: { if(response) { pInfo[playerid][pSex] = 1; SCM(playerid, COLOR_LIGHT, "GENDER: "WHITE"Thanks, now we know that you are a boy. How old are you?"); } else { pInfo[playerid][pSex] = 2; SCM(playerid, COLOR_LIGHT, "GENDER: "WHITE"Thanks, now we know that you are a girl. How old are you?"); } ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "SERVER: Age", ""SYN"It`s important for us to know how "CREM"old"SYN" are you!", "Proceed", "Cancel"); } case DIALOG_AGE: { if(response) { new age = strval(inputtext); if(age > 0 && age < 50) { new y, m, d; getdate(y, m, d); pInfo[playerid][pAge] = age; SCMEx(playerid, COLOR_LIGHT, "AGE: "WHITE"Ok, you was born in %d. Now, sets the corectly email address.", y-age); ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "SERVER: Email", ""SYN"If you lose your account you can use your "CREM"email address "SYN"to recover your account.", "Set", "Cancel"); } else ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "SERVER: Age", ""SYN"It`s important for us to know how "CREM"old"SYN" are you!", "Male", "Female"); } else Kick(playerid); } case DIALOG_EMAIL: { if(response) { if(IsMail(inputtext)) { format(pInfo[playerid][pEmail], 100, inputtext); mysql_format(handle, query, 284, "UPDATE `players` SET `Sex` = '%d', `Age` = '%d', `Email` = '%e' WHERE `username` = '%e'", pInfo[playerid][pSex], pInfo[playerid][pAge], pInfo[playerid][pEmail], GetName(playerid)); mysql_tquery(handle, query, "", ""); mysql_format(handle, query, 256, "SELECT * FROM `players` WHERE `username` = '%e' AND `password` = '%e'", GetName(playerid), playerHashedPass[playerid]); mysql_tquery(handle, query, "accountLogin", "i", playerid); new Cache:count, sCode[41], pIP[16]; gpci(playerid, sCode, 41), GetPlayerIp(playerid, pIP, 16); mysql_format(handle, query, 200, "SELECT * FROM `players` WHERE `serialCode` = '%e'", sCode); count = mysql_query(handle, query), cache_get_data(rows, fields, handle); format(gMsg, 128, "New account - %s (%d) // %d accounts, ip: %s.", GetName(playerid), playerid, rows, pIP), sendAdmins(COLOR_DRED, gMsg); cache_delete(count); } else ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "SERVER: Email", ""DRED"Error: Invalid email format.\n\n"SYN"If you lose your account you can use your "CREM"email address "SYN"to recover your account.", "Set", "Cancel"); } else Kick(playerid); } case DIALOG_BLOCK: { if(response) { mysql_format(handle, query, 284, "SELECT * FROM `accounts_blocked` WHERE `playerID` = '%d' AND `securityCode` = '%e' ORDER BY `id` DESC LIMIT 1", pInfo[playerid][pSQLID], inputtext); mysql_tquery(handle, query, "securityCodeCheck", "i", playerid); } else Kick(playerid); } } return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } // stocks stock resetData(playerid) { loginTries[playerid] = 0; SetPVarInt(playerid, "AddVehicle", 0); Bit_Set(pLogged, playerid, false); return 1; } stock showStats(playerid, tid) { new groupName[50]; SCM(playerid, COLOR_TEAL, "-----------------------------------------------------------------"); SCMEx(playerid, -1, "(%d) %s | Level: %d | Money: %s | Bank money: %s", tid, GetName(tid), pInfo[tid][pLevel], FormatNumber(pInfo[tid][pCash]), FormatNumber(pInfo[tid][pBank])); SCMEx(playerid, -1, "Age: %d | Gender: %s | Email address: %s ", pInfo[tid][pAge], (pInfo[tid][pSex] == 1) ? ("Male") : ("Female"), pInfo[tid][pEmail]); format(groupName, 50, "%s, rank %d",gInfo[pInfo[tid][pMember]][gName], pInfo[tid][pRank]); SCMEx(playerid, -1, "Group: %s", (pInfo[tid][pMember]) ? (groupName) : ("No-one")); SCM(playerid, COLOR_TEAL, "-----------------------------------------------------------------"); return 1; } stock FormatNumber(iNum, const szChar[] = ",") { // source: sa-mp.com forum new szStr[16]; format(szStr, sizeof(szStr), "%d", iNum); for(new iLen = strlen(szStr) - 3; iLen > 0; iLen -= 3) { strins(szStr, szChar, iLen); } return szStr; } stock IsMail(const string[]) { // source: sa-mp.com forum static RegEx:mail; if(!mail) { mail = regex_build("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"); } return regex_match_exid(string, mail); } stock randomString(lenght) { new randomChar[][] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" }; new string[20], rand; for(new i; i < lenght; i++) { rand = random(sizeof(randomChar)); strcat(string, randomChar[rand]); } return string; } stock sendAdmins(color, msg[]) { foreach(new i : Player) { if(pInfo[pAdmin] >= 1) { SCMEx(i, color, msg); } } return 1; } stock sendGroup(color, group, msg[]) { for(new i, j = GetPlayerPoolSize(); i <= j; i++) { if(pInfo[pMember] == group) { SCMEx(i, color, msg); } } return 1; } stock sendgType(color, type, msg[]) { foreach(new i : Player) { if(pInfo[pMember] && gInfo[pInfo[pMember]][gType] == type) { SCMEx(i, color, msg); } } return 1; } stock adminOnly(playerid, admin) { SCMEx(playerid, COLOR_GREY, ""GREY"You need to have admin level "ORANGE"%d+"GREY" to use this command.", admin); return 1; } stock SCMEx(playerid, color, fstring[], {Float, _}:...) { // source: sa-mp.com forum #if defined DEBUG printf("[debug] SCM(%d,%d,%s,...)",playerid,color,fstring); #endif new n = numargs() * 4; if (n == 3 * 4) { return SendClientMessage(playerid, color, fstring); } else { new message[255]; new arg_start; new arg_end; new i = 0; #emit CONST.pri fstring #emit ADD.C 0x4 #emit STOR.S.pri arg_start #emit LOAD.S.pri n #emit ADD.C 0x8 #emit STOR.S.pri arg_end for (i = arg_end; i >= arg_start; i -= 4) { #emit LCTRL 5 #emit LOAD.S.alt i #emit ADD #emit LOAD.I #emit PUSH.pri } #emit PUSH.S fstring #emit PUSH.C 128 #emit PUSH.ADR message #emit PUSH.S n #emit SYSREQ.C format i = n / 4 + 1; while (--i >= 0) { #emit STACK 0x4 } return SendClientMessage(playerid, color, message); } } stock GetName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name; } stock Clearchat(player, lines) { for(new l; l <= lines; l++) { SCM(player, -1, " "); } return 1; }
  2. Ofer servicii PAWN de calitate la preturi accesibile. Preturile vor fi stabilite in functie de complexitatea sistemului. Optimizari; Sisteme de la 0 Copiere sisteme de pe un gamemode pe altul (1 : 1) UPDATE MYSQL. Metode de plata acceptate: (* Metodele de plata colorate sunt cele mai favorabile ) paysafecard paypal neteller skrill Transfer Bancar Revolut Metode de contact: Discord: Dennis12#6604 sau daca nu va functioneaza Dennis#6604 PM pe forum. Cateva sisteme creeate de catre mine: ( Unele fiind de tipul 'opened sourcecode' pe internet ) https://www.youtube.com/channel/UCOZ257Pb8qEu-Xs0pcJlXIA?disable_polymer=true REALIZEZ ORICE TIP DE SISTEM ! DOVEZI CU AFACERI: Am ales sa postez o parte din afacerile mele recente, nu pot posta toate afecerile pe care le-am facut de-a lungul timpul, dar pe cele mai recente le voi posta pentru viitorii mei clienti. https://www.facebook.com/dennis.scripts/photos_albums?lst=100030886472800%3A100030886472800%3A1548971768 Accept toate cererile de prietenie de pe discord. UPDATE: OFER SI SERVICII DE WEB DEVELOPMENT.
  3. Salut, sunt fostul scripter din comunitatea GTA-SAMP. Am decis de acum sa ofer servicii contra cost pentru scripting. Ce pot oferii eu: Rezolvarea bug-urilor. Optimizare. Creare sisteme. Support 7 zile. Metode de plata: PayPal / PaySafeCard. Contact discord: Manevra(GZUZ)#9853
  4. Hello, the server is completely up and running, everything is done: plugin fixed! mysql fixed! But on the server, none Costum map (exterior/interior) Not visible, If you can, help me.
  5. Salut, as dori sa ma apuc de scripting, cum as putea sa invat mai usor? Sorry daca nu e asta categoria corecta.
  6. AndreiAdv - 15 ani Salut, se pare că ai intrat pe topic-ul meu de servicii. Mă numesc Andrei, am 15 ani și scriptez de aproximativ 2 ani (3 cu mari pauze), pot să fac orice cod de la 0, ofer asistență gratuită dacă codul meu nu a suferit modificări mari de către alte persoane, orice problemă găsită la sistem o rezolv gratuit (dacă sistemul nu a fost editat de către cineva major). Prețul este stabilit împreună cu cel ce dorește să cumpere sistemul. Negocierea pretului se face după ce mi se spune ce am de făcut, prețul este stabilit de ambele părți pentru a fii unul cât mai corect. Metodele de plată: PaySafeCard PayPal Skrill Metode de contact: Discord: a n d r e i#0685 Email: [email protected] Skype: iasar.andrei1 Câteva sisteme: (Ps: topic inspirat de la © Lunoxx)
  7. Salut, inainte de toate o mica prezentare. Nume: Claudiu / WiDuAlK Tip servicii: scripting & mapping Nivel de cunostinte: Experimentat Varsta: 20 Contact: Discord:WiDuAlK#6742 sau PM aici Cunostinte: C++ C Matlab Pawn MAP EDITOR TextDraw Editor Ce pot oferi? Depinde de ce mi se cere. Sisteme de la simplu la foarte complex ca nivel de dificultate Mapping Optimizare Rezolvare a oricarui tip de bug Ofer servicii pentru sisteme , nu creez GM uri de la 0 pentru ca e prea mult ca si timp, doar asambluri de sisteme pe care le introduceti dumneavoastra in GameMode. O modalitate este sa comandati toate sistemele de care aveti nevoie pentru un GM, plata se face pentru fiecare in parte iar la final aveti un GM construit pe bucati. Ofer asistare pentru introducerea sistemului, rezolvarea bug-urilor nedescoperite pana in momentul predarii scriptului, in alte cuvinte, dumneavoastra plasati cererea, eu creez sistemul, il testam impreuna, il montam, iar pe parcurs daca apar anumite bug-uri pe care nu le am descoperit initial ofer suport si rezolvare.[GARANTIE ASUPRA SCRIPTULUI] Metoda: Dumneavoastra plasati cererea Eu voi crea sistemul Il testam impreuna Se face tranzactia monetara Se ofera sistemul Plata: PayPal Cont bancar: IBAN Pretul e in functie de produs si de complexitatea lui.
  8. Ma numesc Mihai, am 22 de ani, ofer servicii scripting de calitate, cunosc foarte bine limbajul pawn. Pot face sisteme unice la preturi rezonabile/negociabile. Ofer si cer seriozitate. Ma puteti contacta prin mesaj privat / skype: remusmihai99 / discord: oneshot#5822 Metode de plata: Paysafe, Paypal, transfer bancar
  9. Ofer servicii scripting calitative, sunt la un nivel medium lucrez in acest domeniu de aproximativ 2 ani si jumătate. - Pot crea orice sistem după plăcere, rezva orice bug, optimiza gamemoduri. - Pentru început nu am nevoie de niciun ban lucrez din plăcere pe parcurs daca este sa ne ridicam cu comunitatea si merge totul bine o sa vedem, cer ca cel care are nevoie de serviciile mele sa aiba cel puțin de la 17 ani in sus si sa fie serioși deoarece am lucrat foarte mult cu persoane si dupa o saptamana 2 in care am muncit non stop sau gândit să închidă comunitatea sau sa faca altceva - Ma puteți contacta printr-un PM si vom discuta mai multe. Aici aveți un clip video cu niste sisteme făcute de mine mai sunt si altele dar nu am stat sa filmez. 1- 2 - PS: Nu va uitati la tickuri deoarece este pe localhost si deacea arata doar atatea.
  10. Deci mi-am facut un clan, acum incerc sa bag pe cineva in clan am dat /cinvite si imi spune ca am atins limita de membri dar clan-ul e gol.. Am gamemode bigstone, daca poate careva sa ma ajute
  11. Făcând curat prin hdd-ul calculatorului, am gasit un script care mi-a atras atentia. Este parte din modulul de inregistrare web folosit in anul 2008 la inregistrarea de pe site a serverului de samp eGaming. Poate fi gasit atasat la acest topic. M-am decis sa fac public acest cod pentru ca oricum este o varianta foarte veche, ne mai pastrand nimic din vechiul cod in actuala configuratie. Precum puteti observa, am comentat sectiunea cu accesul la baza de date deci ar trebui sa functioneze fara mysql, singurul lucru de care aveti nevoie este un server de FTP la care sa se conecteze remote pentru a trimite fisieru cu acel cont nou inregistrat. Atentie ! Acest fisier este pentru utilizatorii avansati, care detin cunostiinte cel putin medii de PHP si de configurare a unui server FTP. Codul cu pricina: Desigur ca acest script poate fi modificat sa nu mai depinda de partea de upload a fisierului prin FTP, asta in cazul in care serverul samp si site-ul se afla pe acelasi calculator. Puteti sa-l folositi in proiectele voastre, treaba voastra ce faceti cu el atata timp cat pastrati creditele si nu va dati drept autorul lui. (Nu e nevoie sa gasesc acest script pe "tz" site-uri cu "n" autori, n-am nevoie de mirror-uri). +1 Dacă ți-a plăcut !
  12. Salut! Cine ma poate ajuta cu o comanda de tipul zcmd /bonus si /skip. Folosesc Gamemode-ul Buha v1 asemanator Bugged
  13. Ma poate ajuta cineva cu aceste erori/warning-uri? E:\pawno\include\mSelection.inc(207) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\mSelection.inc(222) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\mSelection.inc(426) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\mSelection.inc(556) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\fly.inc(45) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\fly.inc(45) : warning 219: local variable "y" shadows a variable at a preceding level E:\pawno\include\fly.inc(60) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\fly.inc(60) : warning 219: local variable "y" shadows a variable at a preceding level E:\pawno\include\fly.inc(108) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\fly.inc(108) : warning 219: local variable "y" shadows a variable at a preceding level E:\pawno\include\OPA.inc(57) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\OPA.inc(58) : warning 219: local variable "y" shadows a variable at a preceding level E:\pawno\include\OPA.inc(142) : warning 219: local variable "vehicleid" shadows a variable at a preceding level E:\pawno\include\OPA.inc(144) : warning 219: local variable "x" shadows a variable at a preceding level E:\pawno\include\OPA.inc(145) : warning 219: local variable "y" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(46) : error 017: undefined symbol "AntiDeAMX" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(2955) : warning 219: local variable "vehicleid" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4763) : error 004: function "vUpdate" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4874) : warning 219: local variable "y" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4874) : warning 219: local variable "h" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4893) : warning 219: local variable "y" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4893) : warning 219: local variable "h" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4902) : error 004: function "SS" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4962) : error 004: function "SS" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5013) : error 004: function "ProxDetector" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5166) : error 004: function "SS" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5168) : error 004: function "SS" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5185) : error 004: function "SS" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5344) : error 017: undefined symbol "PutPlayerInVehicleEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5363) : error 017: undefined symbol "PutPlayerInVehicleEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5382) : error 017: undefined symbol "PutPlayerInVehicleEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5401) : error 017: undefined symbol "PutPlayerInVehicleEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5420) : error 017: undefined symbol "PutPlayerInVehicleEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6054) : warning 219: local variable "health" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6056) : error 017: undefined symbol "GetPlayerHealthEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6061) : error 017: undefined symbol "SetPlayerHealthEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6065) : error 017: undefined symbol "SetPlayerHealthEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6494) : error 017: undefined symbol "SetPlayerPosEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6725) : error 004: function "SS" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7234) : warning 219: local variable "x" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7234) : warning 219: local variable "y" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7619) : warning 219: local variable "health" shadows a variable at a preceding level C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7622) : error 017: undefined symbol "GetPlayerHealthEx" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7627) : error 017: undefined symbol "Carspeed" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(8360) : error 017: undefined symbol "NumIp" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(8368) : error 017: undefined symbol "AntiFlood_InitPlayer" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10084) : error 017: undefined symbol "ClearWanted" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10112) : error 017: undefined symbol "BanCheck" C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10247) : error 004: function "CrimInRange" is not implemented C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10470) : error 017: undefined symbol "SetPlayerArmourEx" Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 26 Errors. Asa arata comanda inainte sa o modific si dupa ce am moficat-o: https://pastebin.com/rDN4eMrn
  14. Salut, cine ma poate ajuta cu aceste warning-uri? C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(4552) : warning 217: loose indentation C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(4769) : warning 217: loose indentation C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(4551) : warning 204: symbol is assigned a value that is never used: "string7" C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(10946) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(10946) : warning 204: symbol is assigned a value that is never used: "string" C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(11009) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(15484) : warning 217: loose indentation C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(15494) : warning 217: loose indentation C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(15569) : warning 217: loose indentation C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(17833) : warning 217: loose indentation C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(18230) : warning 217: loose indentation C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(19995) : warning 202: number of arguments does not match definition C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(19995) : warning 202: number of arguments does not match definition C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(42345) : warning 201: redefinition of constant/macro (symbol "strcpy(LastText[playerid],") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43390) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43409) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune2[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43424) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune3[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43439) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune4[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43454) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune5[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43469) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune6[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43484) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune7[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43499) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune8[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(43515) : warning 201: redefinition of constant/macro (symbol "strcpy(raspunsfactiune9[playerid],inputtext,512);") C:\Users\Crysty\Desktop\finally s4uriK 2k18\gamemode\gamemodes\S4K.pwn(45663) : warning 204: symbol is assigned a value that is never used: "raport" Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase Macar alea cu "redefinition of constant/macro.
  15. Salut , am o problema , mi-a disparut itemul .amx din folderul gamemodes, cum fac sa in creez, ma poate ajute cnv?
  16. Stie cineva ce ID are acest obiect? https://imgur.com/RovFho0
  17. Numele tau: ImTouchk, Vlad Ce recrutezi: Un scripter destul de avansat cât să mă ajute la gamemode, nişte persoane să testeze gamemode-ul cât şi câteva persoane pentru a intra în staff şi designeri. Platesti ?: Nu. Cerinte: Skype, iar pentru testeri şi scripter să deţină un calculator/laptop cât să poată rula hamachi, skype şi sa:mp. Alte detalii: Doresc să fac un proiect de la zero, Addicted Roleplay. Singur nu o să reuşesc, aşa că am nevoie de staff. Nu plătesc echipa dar o să ofer funcţii şi o să plătesc eu tot ce e necesar. Server de ROLEPLAY şi NU RPG. Proiectul este unul pe timp de vară. Facem teste pe hamachi.
  18. Ma puteti ajuta cu aceasta problema?: ---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, (C)2005-2015 SA-MP Team [13:19:41] [13:19:41] Server Plugins [13:19:41] -------------- [13:19:41] Loading plugin: mysql [13:19:41] Failed. [13:19:41] Loading plugin: sscanf [13:19:41] [13:19:41] =============================== [13:19:41] sscanf plugin loaded. [13:19:41] (c) 2009 Alex "Y_Less" Cole [13:19:41] 0.3d-R2 500 Players "dnee" [13:19:41] =============================== [13:19:41] Loaded. [13:19:41] Loading plugin: ColAndreas [13:19:41] ********************* [13:19:41] ** Created By: ** [13:19:41] ** [uL]Chris42O ** [13:19:41] ** [uL]Slice ** [13:19:41] ** [uL]Pottus ** [13:19:41] ********************* [13:19:45] Loaded collision data. [13:19:45] ********************* [13:19:45] ColAndreas Loaded [13:19:45] v1.3.0 [13:19:45] ********************* [13:19:45] Loaded. [13:19:45] Loading plugin: streamer [13:19:45] Failed. [13:19:45] Loading plugin: crashdetect [13:19:45] CrashDetect v4.15.1 is OK. [13:19:45] Loaded. [13:19:45] Loading plugin: YSF [13:19:45] Failed. [13:19:45] Loaded 3 plugins. [13:19:45] [13:19:45] Filterscripts [13:19:45] --------------- [13:19:45] Loading filterscript 'Harta.amx'... [13:19:45] [debug] Run time error 19: "File or function is not found" [13:19:45] [debug] Streamer_SetVisibleItems [13:19:45] [debug] CreateDynamicObject [13:19:45] [debug] SetDynamicObjectMaterial [13:19:45] [debug] SetDynamicObjectMaterialText [13:19:45] [debug] CountDynamicObjects [13:19:45] Loaded 1 filterscripts. [13:19:45] [debug] Run time error 19: "File or function is not found" [13:19:45] [debug] mysql_format [13:19:45] [debug] mysql_query [13:19:45] [debug] CreateDynamicObject [13:19:45] [debug] AttachDynamicObjectToVehicle [13:19:45] [debug] DestroyDynamicObject [13:19:45] [debug] SetDynamicObjectPos [13:19:45] [debug] UpdateDynamic3DTextLabelText [13:19:45] [debug] GetDynamicObjectPos [13:19:45] [debug] MoveDynamicObject [13:19:45] [debug] AttachCameraToDynamicObject [13:19:45] [debug] AttachDynamicObjectToObject [13:19:45] [debug] mysql_tquery [13:19:45] [debug] mysql_log [13:19:45] [debug] Streamer_SetVisibleItems [13:19:45] [debug] CreateDynamicPickup [13:19:45] [debug] CreateDynamicMapIcon [13:19:45] [debug] CreateDynamic3DTextLabel [13:19:45] [debug] SetDynamicObjectMaterialText [13:19:45] [debug] CountDynamicPickups [13:19:45] [debug] CountDynamic3DTextLabels [13:19:45] [debug] DestroyDynamicPickup [13:19:45] [debug] CountDynamicObjects [13:19:45] [debug] mysql_close [13:19:45] [debug] mysql_connect [13:19:45] [debug] mysql_errno [13:19:45] [debug] cache_get_row_count [13:19:45] [debug] cache_delete [13:19:45] [debug] cache_get_field_content [13:19:45] [debug] cache_get_data [13:19:45] [debug] IsValidDynamicObject [13:19:45] [debug] AttachDynamicObjectToPlayer [13:19:45] [debug] SetDynamicObjectRot [13:19:45] [debug] StopDynamicObject [13:19:45] [debug] mysql_escape_string [13:19:45] [debug] EditDynamicObject [13:19:45] [debug] IsDynamicObjectMoving [13:19:45] [debug] cache_affected_rows [13:19:45] [debug] DestroyDynamic3DTextLabel [13:19:45] [debug] DestroyDynamicMapIcon [13:19:45] [debug] IsPlayerPaused [13:19:45] [debug] IsVehicleOccupied [13:19:45] [debug] Run time error 19: "File or function is not found" [13:19:45] [debug] mysql_format [13:19:45] [debug] mysql_query [13:19:45] [debug] CreateDynamicObject [13:19:45] [debug] AttachDynamicObjectToVehicle [13:19:45] [debug] DestroyDynamicObject [13:19:45] [debug] SetDynamicObjectPos [13:19:45] [debug] UpdateDynamic3DTextLabelText [13:19:45] [debug] GetDynamicObjectPos [13:19:45] [debug] MoveDynamicObject [13:19:45] [debug] AttachCameraToDynamicObject [13:19:45] [debug] AttachDynamicObjectToObject [13:19:45] [debug] mysql_tquery [13:19:45] [debug] mysql_log [13:19:45] [debug] Streamer_SetVisibleItems [13:19:45] [debug] CreateDynamicPickup [13:19:45] [debug] CreateDynamicMapIcon [13:19:45] [debug] CreateDynamic3DTextLabel [13:19:45] [debug] SetDynamicObjectMaterialText [13:19:45] [debug] CountDynamicPickups [13:19:45] [debug] CountDynamic3DTextLabels [13:19:45] [debug] DestroyDynamicPickup [13:19:45] [debug] CountDynamicObjects [13:19:45] [debug] mysql_close [13:19:45] [debug] mysql_connect [13:19:45] [debug] mysql_errno [13:19:45] [debug] cache_get_row_count [13:19:45] [debug] cache_delete [13:19:45] [debug] cache_get_field_content [13:19:45] [debug] cache_get_data [13:19:45] [debug] IsValidDynamicObject [13:19:45] [debug] AttachDynamicObjectToPlayer [13:19:45] [debug] SetDynamicObjectRot [13:19:45] [debug] StopDynamicObject [13:19:45] [debug] mysql_escape_string [13:19:45] [debug] EditDynamicObject [13:19:45] [debug] IsDynamicObjectMoving [13:19:45] [debug] cache_affected_rows [13:19:45] [debug] DestroyDynamic3DTextLabel [13:19:45] [debug] DestroyDynamicMapIcon [13:19:45] [debug] IsPlayerPaused [13:19:45] [debug] IsVehicleOccupied [13:19:45] Script[gamemodes/briston.amx]: Run time error 19: "File or function is not found" [13:19:45] Number of vehicle models: 0 Va Multumesc!
  19. Poziţie: Eu ma voi ocupa de scripturile in PAWN iar colegul meu Stone se va ocupa de scripturile in PHP Ce servicii pot oferi: Oferim servicii profesionale de PAWN Scripting & PHP la o calitate ridicată, având o experiență vastă, acumulată în decursul anilor.Alte detalii: Pentru că preferăm calitatea și ne place să facem ceva constructiv, mai ales pe partea de SA:MP, însă și în alte domenii, având în vedere experiența pe care am acumulat-o în decursul anilor, împreună cu Stone, am decis să oferim servicii în PAWN Scripting și PHP, servicii ce sunt profesionale și de o calitate ridicată. Putem fi contactați pe pagina de faceboook (O gasiti in semnatura mea) ,pe adresa de e-mail [email protected] sau la una din adresele de Y!M sau Skype de la profilul meu. Ne rezervăm dreptul de a ne selecta clienții în funcție de seriozitate. Mulțumim de atenție!
  20. Poziţie: ProgrammerCe servicii pot oferi: Web Designer/Developer (incluzand JS clean, jQuery, AngularJS -> pe partea design), SA-MP ProgrammerAlte detalii: preturi accesibile, negociez in functie de cerinta, execut orice comanda (nu fac comenzi gen panele sau gamemode-uri, doar sisteme care le integrez in big momma) experienta de aproape 9 ani in programare. accept doar paypal / transfer bancar. 1st rule, without fucking kids. skype: armyw0w yahoo: armyw0w
  21. am o problema cand urc gm pe host imi da o eroare si nu stiu rezolvarea cine ma poate ajuta va rog add marius_200884 [14:54:03] Loaded. [14:54:03] Loading plugin: ColAndreas.so [14:54:03] Failed (libBulletDynamics.so.2.82: cannot open shared object file: No such file or directory) [14:54:03] Loaded 5 plugins. [14:54:03] [14:54:03] Filterscripts [14:54:03] --------------- [14:54:03] Loaded 0 filterscripts. [14:54:03] [debug] Run time error 19: "File or function is not found" [14:54:03] [debug] CA_DestroyObject [14:54:03] [debug] CA_Init [14:54:03] [debug] CA_RayCastLineAngle [14:54:03] [debug] CA_RayCastLine [14:54:03] [debug] Run time error 19: "File or function is not found" [14:54:03] [debug] CA_DestroyObject [14:54:03] [debug] CA_Init [14:54:03] [debug] CA_RayCastLineAngle [14:54:03] [debug] CA_RayCastLine [14:54:03] Script[gamemodes/briston.amx]: Run time error 19: "File or function is not found" [14:54:03] Number of vehicle models: 0
  22. Salutare tuturor, Am vazut pe multe servere ca s-a marit numarul de caractere la /ad-uri si tot odata adaugarea lor pe 2 randuri, aveti vreo idee cum pot sa fac sa apara pe 2 randuri? Am incercat tot felul de metode, insa fara succes. Demo: Daca aveti vreo idee, lasati va rog un Reply. Multumesc. P.S: Daca aveti nevoie de ceva, am sa va raspund. Cu stima, FratziWear
  23. Sn00Py

    Ajutor sistem

    Am luat un script de Texas Hold'em Poker , si am o problema in joc. Cand dau in joc pe prima optiune a dialogului permis doar adminilor rCON , imi apare in consola urmatorul lucru : Acesta este OnDialogResponse-ul din fisier : [pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_CGAMESADMINMENU) { if(response) { switch(listitem) { case 0: { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSELECTPOKER); } case 2: { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESCREDITS); } } } } if(dialogid == DIALOG_CGAMESSELECTPOKER) { if(response) { SetPVarInt(playerid, "tmpEditPokerTableID", listitem+1); ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPOKER); } else { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESADMINMENU); } } if(dialogid == DIALOG_CGAMESSETUPPOKER) { if(response) { new tableid = GetPVarInt(playerid, "tmpEditPokerTableID")-1; if(PokerTable[tableid][pkrPlaced] == 0) { switch(listitem) { case 0: // Place Poker Table { new szString[128]; format(szString, sizeof(szString), "Press '{3399FF}~k~~PED_SPRINT~{FFFFFF}' to place poker table."); SendClientMessage(playerid, COLOR_WHITE, szString); SetPVarInt(playerid, "tmpPlacePokerTable", 1); } } } else { switch(listitem) { case 0: // Edit Poker Table { SetPVarFloat(playerid, "tmpPkrX", PokerTable[tableid][pkrX]); SetPVarFloat(playerid, "tmpPkrY", PokerTable[tableid][pkrY]); SetPVarFloat(playerid, "tmpPkrZ", PokerTable[tableid][pkrZ]); SetPVarFloat(playerid, "tmpPkrRX", PokerTable[tableid][pkrRX]); SetPVarFloat(playerid, "tmpPkrRY", PokerTable[tableid][pkrRY]); SetPVarFloat(playerid, "tmpPkrRZ", PokerTable[tableid][pkrRZ]); EditObject(playerid, PokerTable[tableid][pkrObjectID]); new szString[128]; format(szString, sizeof(szString), "You have selected Poker Table %d, You may now customize it's position/rotation.", tableid); SendClientMessage(playerid, COLOR_WHITE, szString); } case 1: // Destroy Poker Table { DestroyPokerTable(tableid); new szString[64]; format(szString, sizeof(szString), "You have deleted Poker Table %d.", tableid); SendClientMessage(playerid, COLOR_WHITE, szString); ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSELECTPOKER); } } } } else { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSELECTPOKER); } } if(dialogid == DIALOG_CGAMESCREDITS) { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESADMINMENU); } if(dialogid == DIALOG_CGAMESSETUPPGAME) { if(response) { switch(listitem) { case 0: // Buy-In Max { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME2); } case 1: // Buy-In Min { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME3); } case 2: // Blind { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME4); } case 3: // Limit { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME5); } case 4: // Password { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME6); } case 5: // Round Delay { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME7); } case 6: // Start Game { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESBUYINPOKER); } } } else { LeavePokerTable(playerid); } } if(dialogid == DIALOG_CGAMESSETUPPGAME2) { if(response) { if(strval(inputtext) < 1 || strval(inputtext) > 1000000000) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME2); } if(strval(inputtext) <= PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMin]) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME2); } PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMax] = strval(inputtext); return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } else { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } } if(dialogid == DIALOG_CGAMESSETUPPGAME3) { if(response) { if(strval(inputtext) < 1 || strval(inputtext) > 1000000000) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME3); } if(strval(inputtext) >= PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMax]) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME3); } PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMin] = strval(inputtext); return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } else { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } } if(dialogid == DIALOG_CGAMESSETUPPGAME4) { if(response) { if(strval(inputtext) < 1 || strval(inputtext) > 1000000000) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME4); } PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBlind] = strval(inputtext); return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } else { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } } if(dialogid == DIALOG_CGAMESSETUPPGAME5) { if(response) { if(strval(inputtext) < 2 || strval(inputtext) > 6) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME5); } PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrLimit] = strval(inputtext); return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } else { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } } if(dialogid == DIALOG_CGAMESSETUPPGAME6) { if(response) { new tableid = GetPVarInt(playerid, "pkrTableID")-1; strmid(PokerTable[tableid][pkrPass], inputtext, 0, strlen(inputtext), 32); return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } else { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } } if(dialogid == DIALOG_CGAMESSETUPPGAME7) { if(response) { if(strval(inputtext) < 15 || strval(inputtext) > 120) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME7); } PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrSetDelay] = strval(inputtext); return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } else { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESSETUPPGAME); } } if(dialogid == DIALOG_CGAMESBUYINPOKER) { if(response) { if(strval(inputtext) < PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMin] || strval(inputtext) > PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrBuyInMax] || strval(inputtext) > GetPVarInt(playerid, "cgChips")) { return ShowCasinoGamesMenu(playerid, DIALOG_CGAMESBUYINPOKER); } PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActivePlayers]++; SetPVarInt(playerid, "pkrChips", GetPVarInt(playerid, "pkrChips")+strval(inputtext)); SetPVarInt(playerid, "cgChips", GetPVarInt(playerid, "cgChips")-strval(inputtext)); if(PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] == 3 && PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrRound] == 0 && PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrDelay] >= 6) { SetPVarInt(playerid, "pkrStatus", 1); } else if(PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] < 3) { SetPVarInt(playerid, "pkrStatus", 1); } if(PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] == 1 && GetPVarInt(playerid, "pkrRoomLeader")) { PokerTable[GetPVarInt(playerid, "pkrTableID")-1][pkrActive] = 2; SelectTextDraw(playerid, COLOR_GOLD); } } else { return LeavePokerTable(playerid); } } if(dialogid == DIALOG_CGAMESCALLPOKER) { if(response) { new tableid = GetPVarInt(playerid, "pkrTableID")-1; new actualBet = PokerTable[tableid][pkrActiveBet]-GetPVarInt(playerid, "pkrCurrentBet"); if(actualBet > GetPVarInt(playerid, "pkrChips")) { PokerTable[tableid][pkrPot] += GetPVarInt(playerid, "pkrChips"); SetPVarInt(playerid, "pkrChips", 0); SetPVarInt(playerid, "pkrCurrentBet", PokerTable[tableid][pkrActiveBet]); } else { PokerTable[tableid][pkrPot] += actualBet; SetPVarInt(playerid, "pkrChips", GetPVarInt(playerid, "pkrChips")-actualBet); SetPVarInt(playerid, "pkrCurrentBet", PokerTable[tableid][pkrActiveBet]); } SetPVarString(playerid, "pkrStatusString", "Call"); PokerRotateActivePlayer(tableid); ApplyAnimation(playerid, "CASINO", "cards_raise", 4.1, 0, 1, 1, 1, 1, 1); } DeletePVar(playerid, "pkrActionChoice"); } if(dialogid == DIALOG_CGAMESRAISEPOKER) { if(response) { new tableid = GetPVarInt(playerid, "pkrTableID")-1; new actualRaise = strval(inputtext)-GetPVarInt(playerid, "pkrCurrentBet"); if(strval(inputtext) >= PokerTable[tableid][pkrActiveBet]+PokerTable[tableid][pkrBlind]/2 && strval(inputtext) <= GetPVarInt(playerid, "pkrCurrentBet")+GetPVarInt(playerid, "pkrChips")) { PokerTable[tableid][pkrPot] += actualRaise; PokerTable[tableid][pkrActiveBet] = strval(inputtext); SetPVarInt(playerid, "pkrChips", GetPVarInt(playerid, "pkrChips")-actualRaise); SetPVarInt(playerid, "pkrCurrentBet", PokerTable[tableid][pkrActiveBet]); SetPVarString(playerid, "pkrStatusString", "Raise"); PokerTable[tableid][pkrRotations] = 0; PokerRotateActivePlayer(tableid); ApplyAnimation(playerid, "CASINO", "cards_raise", 4.1, 0, 1, 1, 1, 1, 1); } else { ShowCasinoGamesMenu(playerid, DIALOG_CGAMESRAISEPOKER); } } DeletePVar(playerid, "pkrActionChoice"); } return 0; }[/pawn]
×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.