Quantcast
Channel: SA-MP Forums
Viewing all 18226 articles
Browse latest View live

[GameMode] UGF Gamemode (MySQL/Y_INI) [Custom HQ Admin System]

$
0
0
UGF Gamemode


[Important]
This is a gamemode i made for my personal use almost a year ago i stopped updating it, i did not have any use of it and alot of my friends asked me to give them this gamemode (in the past) so here after nearly a year im releasing this gamemode on SA-MP forums.
It my have some bugs or unfinished features but i'll try to fix/complete them and upload a newer version.

Secondly if anyone's here to point out that its a copycat script, please do me a favor, move on.

If anyone wants to make changes in this gamemode and re-upload it, they are allowed to but they need to give the credits.


DOWNLOAD
SOURCECODE


FEATURES


MySQL DATABASE

The main thing in Build 14 version of this gamemode is that it's converted to MySQL.
You can enter the details of the MySQL server here in the script:






SERVER PROTECTION





EASILY CUSTOMIZABLE SCRIPT













OTHER FEATHERS

- VIP Chat (using * symbol)

- Admin Chat (using # and @ symbols)

- Random Server Messages

- Double Server Name (hostname changes every 5-10 seconds)

- High Quality Administration System

- Double RCON Password

- Menu Based Vehicle Spawning System

- Stunt Maps

- Chat Logs

- Commands Logs (stored in files, aswell as displayed to admins)

- VIP Chat Logs (stored in files)

- Admin Chat Logs (stored in files)

- PM Chat Logs (stored in files, aswell as displayed to admins)

- Ban Logs, Kick Logs, Mute Logs (all stored in files)

- Teleports

- Random Spawns

- Random Weapons On Spawn

- Player Animations

- Alot more, can't mention all of them





ADMIN COMMANDS
Code:

ADMIN LEVEL RCON
/setvip [player id] - Change a player's vip level 0-1                                                        (Rcon Command)
/setadmin [player id] [admin level] - Set a player's admin level from 0-7                                (Rcon Command)



ADMIN LEVEL 1
/reports - Check the reports                                                                              (Admin Level 1)
/acms - Toggle connect messages                                                                          (Admin Level 1)
/heal [player id] - Heal a player                                                                          (Admin Level 1)
/equip - Get full health and armour                                                                        (Admin Level 1)
/rms - Toggle report messages On/Off                                                                      (Admin Level 1)
/ip [player id] - Get ip of a player                                                                      (Admin Level 1)
/aspec [playerid] - Spectate a player                                                                      (Admin Level 1)
/killplayer [player id] - Kill a player                                                                    (Admin Level 1)
/armour [player id] - Set a player's armour to 100                                                        (Admin Level 1)



ADMIN LEVEL 2
/invisible - Get invisible                                                                                (Admin Level 2)
/clearchat - Clear chat for everyone                                                                        (Admin Level 2)
/unmute [playerid] - Unmute a player                                                                        (Admin Level 2)
/muted - See the list of muted player                                                                        (Admin Level 2)
/disarm [player id] - Disarm a player                                                                        (Admin Level 2)
/frozen - See the list of frozen players                                                                (Admin Level 2)
/jailed - See the list of jailed players                                                                (Admin Level 2)
/mute [player id] [reason] - Mute a player                                                                (Admin Level 2)
/rpgs - See the list of all the players who have rpgs                                                        (Admin Level 2)
/fcs [player id] - Force a player for class selection                                                        (Admin Level 2)
/sethealth [player id] [health] - Set a player's health                                                (Admin Level 2)
/setarmour [player id] [armour] - Set a player's armour                                                (Admin Level 2)
/kick [playerid] [reason] - Kick a player from the server                                                (Admin Level 2)
/miniguns - See the list of all the players who have miniguns                                                (Admin Level 2)
/grenades - See the list of all the players who have grenades                                                (Admin Level 2)
/resetrpg [player id] - Remove RPG from a player's weapons set                                                (Admin Level 2)
/setworld [player id] [world id] - Change a player's virtual world                                        (Admin Level 2)
/resetminigun [player id] - Remove minigun from a player's weapons set                                          (Admin Level 2)
/resetgrenades [player id] - Remove grenades from a player's weapons set                                (Admin Level 2)



ADMIN LEVEL 3
/rpg - Spawn a RPG                                                                                        (Admin Level 3)
/minigun - Spawn a minigun                                                                                          (Admin Level 3)
/burn [player id] - Burn a player                                                                        (Admin Level 3)
/slap [player id] - Slap a player                                                                        (Admin Level 3)
/unjail [player id] - Unjail a player                                                                        (Admin Level 3)
/freeze [player id] - Freeze a player                                                                        (Admin Level 3)
/hide - Hide yourself from /admins list                                                                (Admin Level 3)
/explode [player id] - Explode a player                                                                (Admin Level 3)
/unfreeze [player id] - Unfreeze a player                                                                (Admin Level 3)
/jail [player id] [reason] - Jail a player                                                                (Admin Level 3)
/get [player id] - Teleport a player to your position                                                        (Admin Level 3)
/drop [player id] [height] - Drop a player from a specific height                                        (Admin Level 3)
/port [player id] [player id] - Teleport a player to another player                                        (Admin Level 3)
/fakechat [player id] [message] - This one's cruel, you can remove it if you want                        (Admin Level 3)
/resetweapon [player id] [weapon id] - Remove a specific weapon from a player's weapons set                (Admin Level 3)



ADMIN LEVEL 4
/ban [player id] [reason] - Ban a player                                                                (Admin Level 4)
/crash [player id] - Crash a player, may be needed sometimes                                                (Admin Level 4)
/announce [message] - Make an important announcement for everyone (Admin Level 4)
/minigunfight - Start a minigun fight for 60 seconds, everyone gets a minigun with infinite ammo        (Admin Level 4)
/aanounce [message] [time] - Same as the previous announce command but this time with [time] parameter        (Admin Level 4)



ADMIN LEVEL 5
/banip [ip] - Ban an ip                                                                                (Admin Level 5)
/unbanip [ip] - Unban an ip                                                                                (Admin Level 5)
/kickall - Kick everyone in the server                                                                        (Admin Level 5)
/armourall - Give everyone full armour                                                                        (Admin Level 5)
/healall - Heal all players on the server                                                                (Admin Level 5)
/getall - Teleport everyone to your position                                                                (Admin Level 5)
/giveallweapon [weapon id] - Give a specific weapon to everyone                                        (Admin Level 5)
/setmoney [player id] [money] - Set money of a player to a specific amount                                (Admin Level 5)
/giveweapon [player id] [weapon id] - Give a specific weapon to a specific playa                        (Admin Level 5)
/gfrscore [player id] [score] - Give specific amount of freeroam score to a player                        (Admin Level 5)
/rfrscore [player id] [score] - Reduce specific amount of freeroam score of a player                        (Admin Level 5)
/gdmscore [player id] [score] - Give specific amount of deathmatch score to a player                        (Admin Level 5)
/rdmscore [player id] [score] - Reduce specific amount of deathmatch score of a player                        (Admin Level 5)



ADMIN LEVEL 6
/unban [account id] - Unban a player                                                                        (Admin Level 6)
/readpms - Toggle the visibility of other people's private messages                                        (Admin Level 6)
/write [message] - Write something in the chat without showing your name                                (Admin Level 6)
/readcmds - Toggle the visibility of the commands that the other players use                                (Admin Level 6)




ADMIN LEVEL 7
/lockserver - Lock the server                                                                                (Admin Level 7)
/restartserver - Restart the server                                                                        (Admin Level 7)
/rs - Shortcut command for restarting the server                                                        (Admin Level 7)





PLAYER COMMANDS

Code:

/fr - Change to FreeRoam Mode

/dm - Change to DeathMatch Mode

/jp - Spawn a jetpack

/cms - Toggle chat messages On/Off

/pm [player id] [message] - Private message a player

/r - Shortly reply to the previous private message

/pms - Toggle private messages On/Off

/time [time id] - Change the game's time

/rtime - Reset the time to original

/weather [weather id] - Change the game's weather

/rweather - Reset the weather to original

/v [Optional: vehicle id] - Spawn a vehicle through vehicle's menu or directly by the id.

/netstats - Show netstats

/vcolor - Change vehicle's color

/stats [Optional: player id] - See personal or a specific player's stats

/go [player id] - Teleport to a player

/gos - Toggle gos On/Off

/god - Toggle GodMode On/Off

/skin [Optional: player id]  - Change player's skin/character

/kill - Suicide

/fs - Change fighting style

/new - See server updates

/spawn - Change spawn position (Only for registered players)

/rspawn - Reset spawn position

/home - Teleport to the spawn position

MISCELLANEOUS COMMANDS
Code:

/a - Show the list of animations

/wank - Fapping animation

/sit - Sit and enjoy the life

/injured - Need a wounded player animation for roleplaying? Say no more fam

/slapass - Slap some asses

/cam - Get a camera, take pictures.

/flowers - Get some flowers

/nightvision - Get night-vision goggles.

/para - Get a parachute

/dive [Optional: height] - Dive from the sky

/drunk - Set drunk level

/cuffed - Get cuffed

/drink - Get a vine, drink it, get drunk.

/handsup - Play hands-up animation

/piss - Piss around

/carry - Play carry animation

/call - Play call animation

/smoke - Smoke some weed

VEHICLE COMMANDS

Code:

/[literally any vehicle's name] - Spawn any vehicle by its name

/v [Optional: vehicle id] - Spawn a vehicle by its id or the 'textdraw' menu

/lock - Lock the doors of the vehicle you're in

/hydraulics - Add hydraulics to your vehicle

TELEPORTS

Code:

/sp - Stunt park (Custom map)
 
/a51 - Area 51  // Credits to SA-MP Team
 
/si - Stunt Island // Credits to SAMP Team
 
/lsa - Los Santos Airport
 
/sfa - San Ferreiro Airport
 
/lva - Las Venturas Airport
 
/aa - Abandoned Airport
 
/ls - Los Santos
 
/sf - San Ferreiro
 
/lv - Las Venturas
 
/cj - CJ's House
 
/atd - LS Airport Ticket Desk

/wh - Warehouse

/wh2 Warehouse 2

/arch - Arch Angles

/tf - TransFender

/loco - Loco Low Co

/army - Army base

VIP COMMANDS

Code:

/vips - Show list of VIPS

/count [seconds] - Show backwards countdown for all nearby players

/megajump - Toggle the ability to jump high

/neon - Add neons to you vehicle

/cart - Drive a shopping cart

/siren - Add siren to your vehicle

/rvcolor - Rainbow colors for your vehicle (constantly changing color)

/spec [player id] - Spectate a player


SCREENSHOTS











CREDITS

SA-MP Team
Mr.K0P (Me) For This Gamemode
Creators of all the plugins listed below




Plugins Used
a_samp
Y_INI
a_mysql
streamer
sscanf
foreach
strlib
mSelection
aDialog
crashdetect

Coordinates and Command?

$
0
0
The first one is my coordinates.

It's spawning me like this:
https://imgur.com/a/oj6taIV

But i want to spawn me like this:
https://imgur.com/HpQlBQJ

Here is my code:

OnPlayerRequestClass
Code:

SetPlayerPos(playerid, -312.614196, 1541.088134, 75.562500);
    SetPlayerFacingAngle(playerid, 182.975006);
    SetPlayerCameraLookAt(playerid, -312.614196, 1541.088134, 75.562500);
    SetPlayerCameraPos(playerid, -312.614196 + (5 * floatsin(-182.975006, degrees)), 1541.088134 + (5 *
floatcos(-182.975006, degrees)), 75.562500);
    return 1;




The other one is my command.
/cmds.
I made it to a dialogue but i want "***Basic Commands***" to be up and then down to be empty space and then the commands.
But it's showing me like this:
https://imgur.com/a/fA8YTgV


Here's my code:

Command: /cmds
Code:

CMD:cmds(playerid, params[])
{
        new stringer[256];
        strcat(stringer, "{F50000}***Basic Commands***");
        strcat(stringer, "");
        strcat(stringer, "{05FF00}/cmds {FFFFFF}- Shows the list of the commands");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{F50000}Porsh Server Commands", stringer, "Close","");
    return 1;
}


Help?

[Ajuda] Dinheiro salvo (Sqlite)

$
0
0
Olá, estou com um problema que parece ser simples mas não estou achando o problema, vms lá.

O dinheiro que temos salva corretamente ao sair do game, mas quando voltamos a entrar o dinheiro simplesmente zera, como resolver? já procurei e não achei nada sobre isto.

Melee damage out of world bounds?

$
0
0
Are there plans to extend the range of where melee damage is taken/given?

As I know this was tweaked for snipers and explosives.

@Kalcor @DevTeam

Custom skins in 03dl

$
0
0
Is it possible to put textures of objects like the Kevlar vest on server version 03dl? I saw the tutorial and put it but I do not know how to put this object

[0.3.7/DL] Countryside Roleplay [ENGLISH][HEAVY RP]

[18:26:00] [debug] #0 0074b9a8 in public cmd_editgate

$
0
0
Code:

[18:26:00] [debug] #0 0074b9a8 in public cmd_editgate (playerid=0, params[]=@00d130c8 "create 980") at HIDDEN/.pwn:74867
[18:26:00] [debug] #1 native CallLocalFunction () from samp03svr
[18:26:00] [debug] #2 00002d00 in public OnPlayerCommandText (playerid=0, cmdtext[]=@00d13074 "/editgate create 980") at HIDDEN/zcmd.inc:108

Code:

                return CallLocalFunction("OnPlayerCommandPerformed", "isi", playerid, cmdtext, CallLocalFunction(funcname, "is", playerid, cmdtext[pos])); //ERROR LINE IN zcmd.inc
Code:

CMD:editgate(playerid, params[])
{
        if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pDev] >= 2 || PlayerInfo[playerid][pMapper] == MAPPERRANK_MANAGER)
        {
                new action[24], optional;
                if(!sscanf(params, "s[24]F(0.0)", action, optional))
                {
                        if(!strcmp(action,"create",true)){
                            new objid, tempgid, bool:found = false;
                        if(!sscanf(params, "s[24]i", action, objid)){
                            if(IsAValidGateObject(objid)){
                                        //for(new i=1;i<=MAX_GATES;i++){
                                        for(new i=0;i <= MAX_GATES;i++){
                                            if(Gates[i][GateCreated] == 0){ //ERROR LINE 74867
                                                tempgid = i;
                                                                found = true;
                                                break;
                                                        }
                                        }
                                        if(found){
                                            new Float:x, Float:y, Float:z, vw, inter;
                                            GetPlayerPos(playerid, x, y, z);
                                            vw = GetPlayerVirtualWorld(playerid);
                                            inter = GetPlayerInterior(playerid);
                                            EditingGate[playerid] = tempgid;
                                            strmid(sendername, PlayerOOCName(playerid), 0, MAX_PLAYER_NAME);
                                            Gates[tempgid][GateBy] = sendername;
                                            Gates[tempgid][GateObjectID] = objid;
                                            Gates[tempgid][GateX] = x+1;
                                            Gates[tempgid][GateY] = y+1;
                                            Gates[tempgid][GateZ] = z;
                                            Gates[tempgid][GateRotX] = 0;
                                            Gates[tempgid][GateRotY] = 0;
                                            Gates[tempgid][GateRotZ] = 0;
                                            Gates[tempgid][GateVW] = vw;
                                            Gates[tempgid][GateINT] = inter;
                                            Gates[tempgid][GateStatus] = 0;
                                            CreateGate(tempgid);
                                            format(str, sizeof(str), "  You have succesfully spawned gate(%d) at your current position.", tempgid);
                                                        SendClientMessage(playerid, COLOR_GRAD1, str);
                                                        format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has spawned gate(%d) at their position.", PlayerOOCName(playerid), tempgid);
                                                        ABroadCast(COLOR_WHITE, str, 1);
                                                }
                                                else{
                                                    SendClientMessage(playerid, COLOR_DARKRED, "ERROR: Max gates reached !");
                                                }
                                        }
                                        else {
                                            SendClientMessage(playerid, COLOR_GRAD1, "  Invalid object ID !");
                                        }
                                }
                                else{
                                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /editgate create [OBJECTID]");
                                }
                        }
                        else if(!strcmp(action, "id", true))
                        {
                                new gateid;
                                if(!sscanf(params, "s[24]i", action, gateid))
                                {
                                        if(gateid == 0 || gateid > MAX_GATES) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid gate ID.");
                                        if(Gates[gateid][GateCreated] == 1)
                                        {
                                                EditingGate[playerid] = gateid;
                                                format(str, sizeof(str), "You are now editing gate(%d).", EditingGate[playerid]);
                                                SendClientMessage(playerid, COLOR_GRAD1, str);
                                        }
                                        else
                                        {
                                                SendClientMessage(playerid, COLOR_GRAD1, "Invalid gate ID.");
                                        }
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate id [GATEID]");
                                }
                        }
                        else if(!strcmp(action, "faction", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                    new
                                        faction;
                                        if(sscanf(params, "s[24]i", action, faction))
                                            return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate [faction id]");

                                        if(!(faction > -1))
                                                return SendClientMessage(playerid, COLOR_GREY, "Invalid faction ID.");

                        Gates[EditingGate[playerid]][Faction] = faction;

                        format(str, sizeof(str), "You have successfully changed gate(%d)'s faction to %d.", EditingGate[playerid], faction);
                                    SendClientMessage(playerid, COLOR_GREY, str);
                                }
                        }
                        else if(!strcmp(action, "group", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                    new
                                        group;
                                        if(sscanf(params, "s[24]i", action, group))
                                            return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate [faction id]");

                                        if(!(group > -1))
                                                return SendClientMessage(playerid, COLOR_GREY, "Invalid faction ID.");

                        Gates[EditingGate[playerid]][Group] = group;

                        format(str, sizeof(str), "You have successfully changed gate(%d)'s faction to %d.", EditingGate[playerid], group);
                                    SendClientMessage(playerid, COLOR_GREY, str);
                                }
                        }
                        else if(!strcmp(action, "object", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        new objid;
                                        if(!sscanf(params, "s[24]i", action, objid))
                                        {
                                                if(IsAValidGateObject(objid))
                                                {
                                                        DestroyDynamicObject(Gates[EditingGate[playerid]][GateObject]);
                                                        Gates[EditingGate[playerid]][GateObject] = 0;
                                                        Gates[EditingGate[playerid]][GateObjectID] = objid;
                                                        CreateGate(EditingGate[playerid]);
                                                        format(str, sizeof(str), "You have succesfully changed gate(%d)'s object to %d.", EditingGate[playerid], objid);
                                                        SendClientMessage(playerid, COLOR_GRAD1, str);
                                                }
                                                else
                                                {
                                                        SendClientMessage(playerid, COLOR_GRAD1, "Invalid object ID.");
                                                }
                                        }
                                        else
                                        {
                                                SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate object [OBJECTID]");
                                        }
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_WHITE, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "position", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        GateAction[playerid] = EDITING_GATE_POSITION;
                                        EditDynamicObject(playerid, Gates[EditingGate[playerid]][GateObject]);
                                        format(str, sizeof(str), "You are now editing gate(%d)'s position.", EditingGate[playerid]);
                                        SendClientMessage(playerid, COLOR_GRAD1, str);
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "oposition", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        GateAction[playerid] = EDITING_GATE_OPOSITION;
                                        EditDynamicObject(playerid, Gates[EditingGate[playerid]][GateObject]);
                                        format(str, sizeof(str), "You are now editing gate(%d)'s opened position.", EditingGate[playerid]);
                                        SendClientMessage(playerid, COLOR_GRAD1, str);
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "speed", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        new Float:newspeed;
                                        if(!sscanf(params, "s[24]f", action, newspeed))
                                        {
                                                if(newspeed < 0.001 || newspeed > 10) return SendClientMessage(playerid, COLOR_GRAD1, "Speed must be between 0.001 or 10 seconds per unit.");
                                                Gates[EditingGate[playerid]][GateSpeed] = newspeed;
                                                format(str, sizeof(str), "Gate(%d)'s Speed was succesfully adjust to %f seconds/unit.", EditingGate[playerid], newspeed);
                                                SendClientMessage(playerid, COLOR_GRAD1, str);
                                        }
                                        else
                                        {
                                                SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate speed [NEWSPEED(Seconds/unit)]");
                                        }
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "radius", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        new Float:newradii;
                                        if(!sscanf(params, "s[24]f", action, newradii))
                                        {
                                                if(newradii < 1 || newradii > 15) return SendClientMessage(playerid, COLOR_GRAD1, "Radius must be between 1 or 15 units.");
                                                Gates[EditingGate[playerid]][GateRadius] = newradii;
                                                format(str, sizeof(str), "Gate(%d)'s Radius was succesfully adjust to %f units.", EditingGate[playerid], newradii);
                                                SendClientMessage(playerid, COLOR_GRAD1, str);
                                        }
                                        else
                                        {
                                                SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate radius [NEWRADIUS(in units)]");
                                        }
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "houseid", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        new hid;
                                        if(!sscanf(params, "s[24]i", action, hid))
                                        {
                                                if(HouseInfo[hid][hCreated] == 1)
                                                {
                                                        Gates[EditingGate[playerid]][GateHouseID] = HouseInfo[hid][hSQLID];
                                                        format(str, sizeof(str), "Gate(%d) was succesfully connected to house %i.", EditingGate[playerid], hid);
                                                        SendClientMessage(playerid, COLOR_GRAD1, str);
                                                }
                                                else
                                                {
                                                        SendClientMessage(playerid, COLOR_GRAD1, "Invalid house ID.");
                                                }
                                        }
                                        else
                                        {
                                                SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate houseid [HOUSEID(to connect the gate to)]");
                                        }
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "delete", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        DestroyDynamicObject(Gates[EditingGate[playerid]][GateObject]);
                                        Gates[EditingGate[playerid]][GateObject] = 0;
                                        strmid(Gates[EditingGate[playerid]][GateBy], "", 0, strlen("None"), 255);
                                        Gates[EditingGate[playerid]][GateCreated] = 0;
                                        Gates[EditingGate[playerid]][GateObjectID] = 0;
                                        Gates[EditingGate[playerid]][GateX] = 0;
                                        Gates[EditingGate[playerid]][GateY] = 0;
                                        Gates[EditingGate[playerid]][GateZ] = 0;
                                        Gates[EditingGate[playerid]][GateRotX] = 0;
                                        Gates[EditingGate[playerid]][GateRotY] = 0;
                                        Gates[EditingGate[playerid]][GateRotZ] = 0;
                                        Gates[EditingGate[playerid]][GateVW] = 0;
                                        Gates[EditingGate[playerid]][GateINT] = 0;
                                        Gates[EditingGate[playerid]][MveGateX] = 0;
                                        Gates[EditingGate[playerid]][MveGateX] = 0;
                                        Gates[EditingGate[playerid]][MveGateX] = 0;
                                        Gates[EditingGate[playerid]][GateSpeed] = 0;
                                        Gates[EditingGate[playerid]][GateRadius] = 0;
                                        Gates[EditingGate[playerid]][GateHouseID] = 0;
                                        Gates[EditingGate[playerid]][GateStatus] = 0;
                                        format(str, sizeof(str), "You have deleted gate(%d).", EditingGate[playerid]);
                                        SendClientMessage(playerid, COLOR_GRAD1, str);
                                        format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has deleted gate(%d).", PlayerICName(playerid), EditingGate[playerid]);
                                        ABroadCast(COLOR_WHITE, str, 1);
                                        EditingGate[playerid] = 0;
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "reload", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        new gid = EditingGate[playerid];
                                        DestroyDynamicObject(Gates[gid][GateObject]);
                                        Gates[gid][GateObject] = CreateDynamicObject(Gates[gid][GateObjectID], Gates[gid][GateX], Gates[gid][GateY], Gates[gid][GateZ], Gates[gid][GateRotX], Gates[gid][GateRotY], Gates[gid][GateRotZ], Gates[gid][GateVW], Gates[gid][GateINT]);
                                        format(str, sizeof(str), "You have reloaded gate(%d).", EditingGate[playerid]);
                                        SendClientMessage(playerid, COLOR_GRAD1, str);
                                        format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has reloaded gate(%d).", PlayerICName(playerid), EditingGate[playerid]);
                                        ABroadCast(COLOR_WHITE, str, 1);
                                        EditingGate[playerid] = 0;
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else if(!strcmp(action, "stop", true))
                        {
                                if(EditingGate[playerid] != 0)
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "Editing progress was ended.");
                                        EditingGate[playerid] = 0;
                                }
                                else
                                {
                                        SendClientMessage(playerid, COLOR_GRAD1, "You are not editing any gate.");
                                }
                        }
                        else
                        {
                                SendClientMessage(playerid, COLOR_WHITE, "Invalid action.");
                        }
                }
                else
                {
                        SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editgate [action]");
                        SendClientMessage(playerid, COLOR_GREY, "Available actions: create, id, object, position, oposition, speed, houseid, radius, delete, stop, reload");
                        SendClientMessage(playerid, COLOR_GREY, "Available actions: faction");
                }
        }
        else
        {
                AdmErrorMsg;
        }
        return 1;
}

NOTE: No errors in script!

[Ajuda] A procura desse FS

$
0
0
Gostaria de saber se alguem sabe algum FS que eu possa deixar a minha arma desse jeito (no peito).

Please need some help

$
0
0
Hello everybody i need some help of gamemode optimization, can you teach me how i can OPTIMIZE a gamemode?

here is pastebin: https://pastebin.com/fUnH7CYf

this gamemode in lithuanian language, but i think you understand that functions,timers and .etc

I can pay via paypal if you very need some cash

and sorry for my english

OnActorDeath

$
0
0
Hi!

When i put this public,i get the null error.
No error messages,no crash,no text in the compilier box,nothing,just white,and the amx file is 0kb.

Code:

public OnActorDeath(actorid, killerid, reason);
{
    if(actorid == NPCTerorist[0])
        {
            if(kteroristi[killerid] != 2)
            {
                kteroristi[killerid]++;
                return 1;
            }
            else
            {
                new msk[182], totalmisiune = 5000 + random(10000);
                format(msk, 148, "Ai primit %s$ pentru rezolvarea acestei misiuni! Felicitari!", FormatNumber(totalmisiune));
                        SendClientMessage(killerid, COLOR_GREEN, msk);
                        giveMoney(killerid, totalmisiune);
                        giveXP(killerid, 15);
                        giveScore(killerid, 3);
                        DestroyActor(NPCTerorist[1]);
                        DestroyActor(NPCTerorist[0]);
                        KillTimer(terotimer[playerid]);
                        MissionStep[1][killerid] = 0;
                        KillTimer(drugedtimer[playerid]);
                        MissionTaken[1] = false;
                        kteroristi[killerid] = 0;
                        MissionOnPlayer[1][killerid] = false;
                        mission = false;
                        foreach(new i : Player)
                                        {
                                                if (isLEO(i))
                                                {
                                                        new radio[100];
                                                        format(radio, sizeof(radio), "%s a terminat misiunea 'Alah akbar!' si a primit %s$ !", GetName(killerid), FormatNumber(totalmisiune));
                                                        SendClientMessage(i, COLOR_PURPLE, radio);
                                                }
                                    }
            return 1;
            }
        }
        if(actorid == NPCTerorist[1])
        {
            if(kteroristi[killerid] != 2)
            {
                kteroristi[killerid]++;
                return 1;
            }
            else
            {
                new msk[182], totalmisiune = 5000 + random(10000);
                format(msk, 148, "Ai primit %s$ pentru rezolvarea acestei misiuni! Felicitari!", FormatNumber(totalmisiune));
                        SendClientMessage(killerid, COLOR_GREEN, msk);
                        giveMoney(killerid, totalmisiune);
                        giveXP(killerid, 15);
                        giveScore(killerid, 3);
                        DestroyActor(NPCTerorist[1]);
                        DestroyActor(NPCTerorist[0]);
                        MissionStep[1][killerid] = 0;
                        MissionTaken[1] = false;
                        KillTimer(terotimer[playerid]);
                        kteroristi[killerid] = 0;
                        MissionOnPlayer[1][killerid] = false;
                        mission = false;
                        foreach(new i : Player)
                                        {
                                                if (isLEO(i))
                                                {
                                                        new radio[100];
                                                        format(radio, sizeof(radio), "%s a terminat misiunea 'Alah akbar!' si a primit %s$ !", GetName(killerid), FormatNumber(totalmisiune));
                                                        SendClientMessage(i, COLOR_PURPLE, radio);
                                                }
                                    }
            return 1;
            }
        }
        return 1;
}

Random mission

$
0
0
Hi!

why i get everytime the mission 1?

Code:

public missionTimer()
{
        if(mission != 1 || mission != 2 || mission != 3 || mission != 4 || mission != 5 || mission != 6)
        {
                new mss;
                mss = 1 + random(1);
                if(mss == 1)
                {
                        mission = 1;
                        foreach(new i : Player)
                        {
                                if (isLEO(i))
                                {
                                        SendClientMessage(i, COLOR_PURPLE, "Misiunea 'Disparutul' a fost raportata ! (/startmission)");
                                }
                        }
                }
                if(mss == 2)
                {
                        mission = 2;
                        foreach(new i : Player)
                        {
                                if (isLEO(i))
                                {
                                        SendClientMessage(i, COLOR_PURPLE, "Misiunea 'Alah akbar!' a fost raportata ! (/startmission)");
                                }
                        }
                }
        }
        return 1;
}

Help team

$
0
0
someone helps me with this

1)How to place the anti team kill

2)How to optimize the code so that no error

3)When a player of one team eliminates another one, they rejoin their position

4)How can I make a command to change the team?

I will give more +reputation

Code: OnDialogResponse

PHP Code:

     if(dialogid == DIALOG_TEAMS)
     {
        if(
response)
        {
                 if(
listitem == 0//Dragons
                 
{
                         
SetSpawnInfo(playerid0179,  318.8639,1121.6978,1083.8828,180.165924,9999924,9999924,99999);
                         if(
gTeam[playerid] == DRAGONS) { SetPlayerTeam(playerid179); }
                         
SetPlayerColor(playeridCOLOR_DRAGONS);
                         
SetPlayerSkin(playeridDragons[random(3)]);
                         
SetPlayerInterior(playerid5);
                         
SetPlayerHealth(playerid100);
                         
SpawnPlayer(playerid);
                 }
                 if(
listitem == 1//Templarios
                 
{
                         
SetSpawnInfo(playerid12062264.5317,-1209.7946,1049.0234,253.036724,9999924,9999924,99999);
                           if(
gTeam[playerid] == TEMPLARIO) { SetPlayerTeam(playerid206); }
                           
SetPlayerColor(playeridCOLOR_TEMPLARIOS);
                           
SetPlayerSkin(playeridTemplarios[random(3)]);
                         
SetPlayerInterior(playerid10);
                         
SetPlayerHealth(playerid100);
                         
SpawnPlayer(playerid);
                 }
        }
     } 

Alternate for GitHub with higher storage size

$
0
0
Hi guys, I'm looking for a free GitHub/GitHub Pages alternative which can provide me higher storage size to host my files. Currently, GitHub allows me to host only 1 GB of data. Now please don't ask me why I need more than that but I just do. One big requirement would be to get the direct link to the file with the actual file name and not some randomized file name. I need preferably a minimum of 5 GB of storage so that I can host a lot of files like audio files etc. I'm not really an expert when it comes to this git/GitHub stuff so it would be awesome if the upload process would be simple. Thanks.

[MAP/Showcase] Luxury Garage Int - 2

$
0
0
Hello friends, I am back and I came to bring a novelty, well the map is an improvement of the predecessor.
The map is bigger, very mair. There are places for about 10 vehicles, the map contains a beautiful office with a mini golf course (hahahahaha). It has an upper floor where it has a beautiful table with tv and a mini bar. I hope you enjoy and evaluate.
((Again, I bet on the reflective floor, I think this time I hit it.))
Print's:
























[Pedido] Retorno Automático API PagSeguro

$
0
0
Quando compra um item com cartão gera uma key no PAGSEGURO.

E pode-se usar no SAMP, Ativando por um dialog ou comando.

Ninguém tem uma BASE disso? Achei um tópico desse:

https://forum.sa-mp.com/showthread.php?t=606843

Só que não consigo acompanhar o raciocínio da explicação do criador do tópico :\

Se alguém tiver alguma base, posta ai :3

how to use foreach

Streamer pickups

$
0
0
Hey

How I can toggle a pickup for a specific player?

If I use Streamer_RemoveArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_PLAYER_ID, playerid); or Streamer_AppendArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_PLAYER_ID, playerid);

and Streamer_Update(playerid, STREAMER_TYPE_PICKUP); the pickup sometimes dissapears after a few seconds but I think it should dissapear instantly

I tried this with different pickup types also type 3 which Disappears after pickup, respawns after death but it not working.

I want to make a police bribe system so the pickup have to dissapear instantly like in singleplayer.

Chatting limit?!

$
0
0
Hello there I saw a magical thing in a server!
look at this picture:
https://imgur.com/a/bsc9sAY
...
this chatting doesn't have any limited things.. for example when I want to do same.. just my 100 or 50.. idk words will send in server for example I used
PHP Code:

/s dlfgdkfgkdfjglksjdfksdmfksdhfnksdhfkjshdnfksdhfkjsdhnfksdfksfdnksdfh 

but just
PHP Code:

dlfgdkfgkdfjglksjdfksdmfksdhfnksdhfkjshdnfksd 

will send.. I mean my words doesn't send completely but my normal chat.. (JUST CHAT NO CMD).. will send all my words.. but my cmds like /s doesn't send my words completely.. but I don't know how that server using this feature without chat limits?!!!

SORRY FOR MY BAD ENGLISH

[Include] GeoLite

$
0
0
GeoLite (SQLite)

It is based on the free product GeoLite2 by MaxMind.

I was updating the country database every month for MySQL and decided to update the GeoIp databases by Whitetiger's include as many people requested. It turned out I was unable to, the way the databases were structured. I converted my version to SQLite and started comparing the two includes with geolite.inc being victorious. But this was to be expected with not only the good database structure and the use of indexes but also the appropriate queries to avoid range scans. Even though latest database provide more data than last year, it did not affect the performance in any way.

The past days, I managed to import Autonomous System (AS) and City databases with the original databases having big flows.
  • Certain organizations in Autonomous System list did have many unique identifiers (ASN - Autonomous System Number) registered to IANA. All duplicates were removed and kept only their initial ASN.
  • Certain ip ranges in City database:
    • did not provide a city name. Country name was used in replacement.
    • did not provide a city name, nor a country name. Continent name was used in replacement.

The above issue arose another problem related to time zones.
  • Antarctica, Asia and Europe have time zone set as +00:00
  • Cities with country name as replacement have central standard time set mostly, with few exceptions. Some examples are:
    • United States is set to have UTC -05:00 (Washington, DC) whereas Central Standard Time is in Chicago (-06:00)
    • Russia is set to Moscow Standard Time (+03:00)

I initially posted these changes and improvements in Whitetiger's thread but due to their absence, I decided to create a new thread. I was also unaware if Whitetiger would accept the changes, nor how the updates would be done.

Installation

Repository: https://github.com/George480/geolite
Releases: https://github.com/George480/geolite/releases
Include: https://raw.githubusercontent.com/Ge...er/geolite.inc

Save as geolite.inc into pawno\include folder. Include in your code and begin using the library:

Code:

#include <geolite>
Place the database you want to use into scriptfiles folder.

Functions
IP-Based Functions:
  • GetIpAutonomousSystem(const geolite_ip[], geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the Autonomous System organization (ISP is an Autonomous System) according to given IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder) or 0 on failure.
  • GetIpCountry(const geolite_ip[], geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the Country name according to given IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder) or 0 on failure.
  • GetIpCity(const geolite_ip[], geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the City name according to given IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder) or 0 on failure.
  • GetIpUTC(const geolite_ip[], geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the UTC offset according to given IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder) or 0 on failure.
Player-Based Functions:
  • GetPlayerAutonomousSystem(playerid, geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the Autonomous System organization (ISP is an Autonomous System) according to given player's IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder and player is connected) or 0 on failure.
  • GetPlayerCountry(playerid, geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the Country name according to given player's IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder and player is connected) or 0 on failure.
  • GetPlayerCity(playerid, geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the City name according to given player's IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder and player is connected) or 0 on failure.
  • GetPlayerUTC(playerid, geolite_dest[], geolite_len = sizeof (geolite_dest))
    • Stores the UTC offset according to given player's IP, passed by reference.
    • Returns 1 on success (database file exists in scriptfiles folder and player is connected) or 0 on failure.

Usage
pawn Code:
#include <a_samp>
#include <sscanf2>
#include <geolite>

main() {}

public OnPlayerConnect(playerid)
{
    new player_name[MAX_PLAYER_NAME], player_country[MAX_COUNTRY_LENGTH], connection_text[80];
       
    GetPlayerName(playerid, player_name, MAX_PLAYER_NAME);
    GetPlayerCountry(playerid, player_country, MAX_COUNTRY_LENGTH);

    format(connection_text, sizeof (connection_text), "%s joined from %s", player_name, player_country);
    SendClientMessageToAll(0xFFFF00FF, connection_text);
    return 1;
}

Extra Notes
127.0.0.1 is given as "Unknown" as it is a private IP.

Country and City databases are updated every first Tuesday of every month.
ASN database is updated every Tuesday.

For a start, I will be updating the databases every month (1 day after their release). If the majority of the users want a weekly update on ASN database, please inform me.

It opens the databases on startup according to which database exists in scriptfiles folder, therefore if you prefer to use the Country database only, place maxmind_country.db into scriptfiles folder and not the other two databases.

A MySQL version would require non-threaded queries to keep the same usage of functions. If you have any suggestion, please inform me.

Constants:
pawn Code:
#define MAX_AUTONOMOUS_SYSTEM_LENGTH    95
#define MAX_COUNTRY_LENGTH              45
#define MAX_CITY_LENGTH                 64
#define MAX_UTC_LENGTH                  7

Requirements
sscanf: https://github.com/maddinat0r/sscanf/releases

Credits
  • MaxMind - GeoLite2
  • Alex "Y_Less" Cole - sscanf
  • Andy Skelton - ordering by `ip_to` (avoidance of range scan)
  • Nikolay Bachiyski - ordering by `ip_to` (avoidance of range scan)
  • Mark Robson - highest `ip_from` which is less than or equal to the given IP (avoidance of next country returned due to gaps)

Problems getting comma separated values

$
0
0
I want to store multiple values in one field in the MySQL database.

This is the way I am currently using to store data (convert to string and concatenate a comma)

PHP Code:

for(new 010i++) {
        
Player[playerid][playerPmBlocks][i] = 0;
        
valstr(tempPlayer[playerid][playerPmBlocks][i]);
        
strcat(blockstringtempsizeof(blockstring));
        
strcat(blockstring","sizeof(blockstring));
    } 

This is my enum:
PHP Code:

enum PlayerInfo {
    
playerPmBlocks[255]
};
new 
Player[MAX_PLAYERS][PlayerInfo]; 

When I get the data, I am using

PHP Code:

cache_get_value(0"ppmblocks"tempblocks255); 

Please tell me a way to remove these commas and store back into the array I am using in the enum.

Also, I am highly unsatisfied by this code. If you guys have any better way to do this, please let me know. This is an urgency.
Viewing all 18226 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>