Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 6,851
» Latest member: gball31
» Forum threads: 2,308
» Forum posts: 12,161

Full Statistics

Online Users
There are currently 496 online users.
» 0 Member(s) | 493 Guest(s)
Bing, Google, Applebot

Latest Threads
Runtime error when connec...
Forum: Support
Last Post: gball31
4 hours ago
» Replies: 0
» Views: 7
Website too damn slow!
Forum: Questions and Suggestions
Last Post: GasmoN
5 hours ago
» Replies: 0
» Views: 8
Discordia - PvP & PvE (Pl...
Forum: Gamemodes
Last Post: hunderinghygi
Today, 01:37 AM
» Replies: 1
» Views: 1,566
[ENG] Secret Zombie Room ...
Forum: Advertisements
Last Post: Ruckus
2025-02-16, 07:15 PM
» Replies: 0
» Views: 27
[USL]'s ANYWORLD FREEROAM
Forum: Advertisements
Last Post: DarkZero
2025-02-16, 02:27 PM
» Replies: 0
» Views: 26
Motion styles | samp-walk...
Forum: Libraries
Last Post: swuffted
2025-02-15, 05:31 PM
» Replies: 1
» Views: 2,501
What city of the country ...
Forum: Chat
Last Post: HyperZ
2025-02-14, 11:26 AM
» Replies: 91
» Views: 140,484
Map Markers new
Forum: Pawn Scripting
Last Post: swuffted
2025-02-13, 09:41 PM
» Replies: 1
» Views: 74
Map Markers new
Forum: Filterscripts
Last Post: swuffted
2025-02-13, 08:36 PM
» Replies: 0
» Views: 191
Zombies VS Humans [ZA;TDM...
Forum: Advertisements
Last Post: MoD
2025-02-13, 07:01 PM
» Replies: 0
» Views: 53

 
Information Two Factor Authentication [2FA]
Posted by: dakyskye - 2019-06-11, 03:15 PM - Forum: Tech - Replies (6)

Which 2FA mobile app do you use and why do you prefer it to others?

I actively used Google Authenticator but I ditched it today.. I'm looking for an (a better) alternative.

Any thoughts?


  Permissions
Posted by: Pinch - 2019-06-09, 07:45 AM - Forum: Questions and Suggestions - Replies (7)

Hmmm, I'm wondering is it possible to create (built-in ) permissions system to open.mp ( yeah, just like in MINECRAFT )

Like


Code:
native AddPermissionGroup("permgroup");
native AddPermissionTree("permgroup", "perm");
native AddPermissionToGroup(groupid, "permission");
native AddGroup(groupName);
native AddPlayerToGroup(playerid, groupName);



And sth like that, ask why?

We can use FS's without actually modifying code like to adapt CMD_PERM_ADMIN or pAdmin and shit like that, instead we can just:

/creategroup Admin
/setgperm Admin permission.cmd.* ( * - all perms from .cmd group, first native )
/setgtoplayer [ Player ] [ Group ]

permission.groupname.perm
permission.fsname.perm

and stuff like that, I hope you understand me :D


  Diverse Roleplay by Tony Patterson
Posted by: TonyP - 2019-06-09, 06:13 AM - Forum: Gamemodes - Replies (5)

?? Diverse?Roleplay?by?TonyP???



???Information???

This gamemode is my hard work, and take note this is NGRP edit, non-mysql based script. All credits goes to NGRP owners and to me only! The reason I'm releasing this gamemode is because, I thought that I could run this gamemode but unfortunately I dont have enough time to run it aslo I have an important exam next year, due to that I cant concentrate on updating this gamemode. But i will try my best to fix bugs, so far i didnt find any of them. Remember this script is NOT for NEWBIES!!


pawn Code:

Code:
General Updates

[/font][/size][/color]

-New awesome login textdraw, not copied from anywhere.



-Server [color=#222222]random[/color] messages are now on the bottom of the screen, I took this idea from PLA because it was my favourite server.



-/stats /help /ah is now in dialog, more structured and looks neat.



-Admins can now show their admin badge via /showabadge, a roleplay dialog will be shown



-Admins can type /oldbiz and /oldhouses to view old and unused biz id and house id..It shows with the owners name.



-Now [color=#2222bb]if[/color] you want to promote helpers, you can check their help counts which means...You can check how many help request have they accepted on their /stats..admins can type /check (their id)



-New business pickupmodel icon



-You can now put your favourite skins inside your house by tying /putskin(idk the commands check via /househelp



-VIPS CAN own up to 3 houses.



-VIPS can now own up to 5 cars.



-You can now put /boombox musics with custom url, just press on the custom url dialog section and put your custom skin, ******* is not supported as usual.

[color=#000000][size=small][font=verdana, geneva, lucida,]- Plenty of admin commands.




Admin commands are messed up on this forum sorry for that because i copied the whole thread from my samp thread.

pawn Code:





Code:
[color=#000000][size=small][font=verdana, geneva, lucida,]CMD:ah(playerid, params[])

{

? ? [color=#2222bb]new[/color] str[5200];

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 1)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"{B4B5B7}*** Trial Admin *** /showabadge /jail /sjail /kick /c /togadvisor /oocmute /ounmute /sfine /fine /spec /gotoid[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** Trial Admin *** /revive /goto /mark[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** REPORT SYSTEM *** /ar (accept report) /tr (trash report) /cr (close report)[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** REPORT SYSTEM *** /sta (send to advisor) /post (post forums)[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** REPORT SYSTEM *** /srm (send report msg to report)[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** REPORT SYSTEM *** /srtha (send report to higher admin)[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 2)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}JUNIOR ADMIN{BFC0C2} *** /gotoid /gethere /ar /dr /reports /post /sta /dt /rfd /nao /hhc /paused[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}JUNIOR ADMIN{BFC0C2} *** ?/god /ban /kick /jail /bigears /freeze /unfreeze /slap /warn /cnn /gethere /gotoid /hospital /goto /requestevent[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}JUNIOR ADMIN{BFC0C2} *** ?/gotoplayerscar /jetpack /god /check /ip /hlmute /nrn /listguns /setvw /setint /vehname /watch[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}JUNIOR ADMIN{BFC0C2} *** ?/ar /dr /reports /post /sta /dt /rfd /nao /hhc /oocpower /amegaphone(/ameg)[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 3)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}GENERAL ADMIN{CBCCCE} *** /aduty /noooc /nonewbie /prison /fine /pfine /takeadminweapons /sendtols /oprison /gotocar /entercar /getcar /sendtoid[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}GENERAL ADMIN{CBCCCE} *** /mole /setskin /countdown /release /force(death/hospital) /rto(reset) /jailaccount /(o)clearflag /mark /reloadpvehicles[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}GENERAL ADMIN{CBCCCE} *** /gotoco /n(un)mute /ad(un)mute /leaders /wepreset /ocheck /owarn /ofine /okills /respawncar(s) /revive /sfine /odebug[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {00FF00}GENERAL ADMIN{CBCCCE} *** (/forcetut - /skiptut) /fuelcar /cr /gr /ahyd /anos /aneon /rtoreset /rto[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 4)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /edit /noadvisor /setchamp /setarmorall /fixvehall /givenos /blowup /setname /startlotto[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /veh /fixveh /sethp /setarmor /givegun /givemoney /setmoney /setfightstyle[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /adivorce /destroycar /destroycars /eventhelp /contracts /rmute[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /unban /unbanip /deletehit /clearall /setinsurance /cmotd /givelicense /adestroyplant /ahelp[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /createpvehicle /destroypvehicle /creategvehicle /vipparty /vto /vtoreset /forceskin /setcapping[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /hnext /dmpnext /(goto/goin)dd /(goto/goin)house /(create/delete/goto)point /banaccount[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /hedit /dd(edit/next/name/pass) /dmpedit /dmpnear /gotomapicon /gangwarn /gangunban /maketiki ?/deletetiki /givetikis[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {EE9A4D}SENIOR ADMIN{D8D8D8} *** /gedit /gnear /gstatus /gnext[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 1337)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}HEAD ADMIN{E3E3E3} *** /weather /weatherall /tod /dedit /pedit /giftall /makehelper /respawnallcars /ipcheck[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}HEAD ADMIN{E3E3E3} *** /permaban /setcolor /payday /clearallreports /eventreset /amotd /vipmotd /givetoken /gifts[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}HEAD ADMIN{E3E3E3} *** /vmute /asellhouse /switchfac /switchfam /refund /setstat /editjob /gotojob /jobnext[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}HEAD ADMIN{E3E3E3} *** /editlocker /lockernext /gotolocker[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}HEAD ADMIN{E3E3E3} *** /bizedit /createbiz /deletebiz /bnext /asellbiz /resetplayerbiz[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 1338)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {298EFF}LEAD HEAD ADMIN{E3E3E3} *** ?/specreset /pausespec /random /vrandom /giftreset /vipgifts /takeadvisor /makeadvisor /vsuspend /oldhouse /oldbiz[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {298EFF}LEAD HEAD ADMIN{E3E3E3} *** ?/afacban /listfacpay /switchfac /facpay /fackick /ofackick /facunban /faccsfban /faccsfunban /sprison /sjail[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {298EFF}LEAD HEAD ADMIN{E3E3E3} *** ?/gangstrike /fedithq /fcreate /fedit /fdelete /silentadmins /gangmods /factionmods /advisormods /djs /mods[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 99998)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {298EFF}Executive Admin{F0F0F0} *** /restartserver /osuspend /unsuspend /suspend /motd /amotd /vipmotd /setspawn[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {298EFF}Executive Admin{F0F0F0} *** /givetikisall /noadmin /makemoderator /removemoderator[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {298EFF}Executive Admin{F0F0F0} *** /makepr /makebanappealer /makegangmod /makefacmod /makedj /makesilentadmin[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 99999)

? ? {

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}Executive Director{E3E3E3} *** ?/savefiles /deletetikis /firework /usetolls /dontusetolls /allowrobbank[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}Executive Director{E3E3E3} *** ?/createdealership /destroydealership /createcdveh /destroycdveh /giveboombox[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? [color=#222222]strcat[/color](str, [color=#000066]"*** {FF0000}Executive Director{E3E3E3} *** ?/makeap /makedev /makeadmin /setvip /changeuserpass[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pBanAppealer] == 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Ban Appealer: /unbanip /unban /ipcheck /oipcheck[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdminPer] == 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Admin Personnel: /makeadmin[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pDJ] == 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"DJ: /playall /stopall[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pSilentAdmin] == 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Silent Admin: /sw(hisper) /sprison /sjail /swarn /skick /sslap[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pFactionModerator] == 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Faction Moderator: /listfacpay /facpay /switchfac /faccsfunban /faccsfban /facban /facunban /fackick /ofackick /leaders /makeleader[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Faction Moderator: /editlocker /lockernext /gotolocker[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pGangModerator] == 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Gang Moderator: /switchfam /fedit /creategvehicle /destroygvehicle /gangwarn /gangunban /fcreate[color=#000099][b]\n[/b][/color]"[/color]);

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Gang Moderator: /fdelete /gangstrike /fedithq[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdvisorModerator] == 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Public Relations: /makeadvisor /takeadvisor /nonewbie /cto /ctoreset /advisors[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color](PlayerInfo[playerid][pDeveloper] >= 1)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Developer: /dev /getcoords /getvehinfo[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color](PlayerInfo[playerid][pDeveloper] >= 6)

? ? {

? ? ? ?SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Asst.Development Director: /makedeveloper /editpoint[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color](PlayerInfo[playerid][pDeveloper] >= 7)

? ? {

? ? ? ? SendClientMessageEx(playerid, COLOR_GRAD5,[color=#000066]"Development Director: /makedeveloper /editpoint[color=#000099][b]\n[/b][/color]"[/color]);

? ? }

? ? [color=#2222bb]if[/color] (PlayerInfo[playerid][pAdmin] >= 1)

? ? {

? ? ? ? ShowPlayerDialog(playerid, DIALOG_SHOW_INFO, DIALOG_STYLE_MSGBOX, [color=#000066]"{33AA33}Administration Commands"[/color], str, [color=#000066]"Ok"[/color], [color=#000066]"Cancel"[/color]);

? ? }

? ? [color=#2222bb]return[/color] 1;

}[/font][/size][/color]





Screenshots?

As soon as possible.



?? CREDITS?? :

-?Tony Patterson (me)?[The main editor and scripter of this gamemode]

-?Natalie Patterson & Geroge Barletta?[For testing this gamemode]

- Respective?NGRP Owners & Developers?[For NGRP Script]

-?Eliteshost.com?for giving me free 100 slots server.

- Christmas and Anims filterscript by?Pedro

if it's your FC let me know by pming me.

Installation Process :

1. Open DRP.pwn file using pawno or what ever, compile it again because i dont have time to compile it.

2. Once u spawn use /rcon login (password) and type /tonyadminme [id] [99999]?

3. Go to airport and you will see some cars near the building like bob cat, type there /setspawn so the players will spawn there, the spawn place was at unity station but i hate that.



??Download links?? :



Mediafire-Click



Note-:

If you need any help feel free to ask me here..



ENJOY WITH THIS GAMEMODE GUYS!


Heart Artworks
Posted by: Renisal - 2019-06-08, 07:14 PM - Forum: Art - Replies (4)

Removed


  Concept Design for open:mp
Posted by: kidpuurp - 2019-06-07, 09:28 PM - Forum: Art - Replies (17)

Hi,?I present to you my idea of a multiplayer client. The first is something similar to the updated SA: MP, for the second I did not invent anything

Do not judge strictly, in the future, mb will finalize the second option.





[Image: uX49HSj.png]

[Image: zoXk56F.png]


  MySQL Prepared Statements
Posted by: PatrickGTR - 2019-06-07, 07:42 PM - Forum: Libraries - Replies (7)

Introduction

Hi, I'll keep it short and simple.?

This emulates prepared statement when using the MySQL plugin.

Thank you for reading this really long introduction.



Download: Click me

Important: sampctl required! check github repository for installation instructions.



Reading Data (using inline)

Code:
new stmt_readloop = MySQL_PrepareStatement(MySQLHandle, "SELECT * FROM spawns");



// Run Threaded on statement

inline OnSpawnsLoad() {

? ? new

? ? spawnID,

? ? Float:spawnX,

? ? Float:spawnY,

? ? Float:spawnZ,

? ? Float:spawnA;



? ? MySQL_BindResultInt(stmt_readloop, 0, spawnID);

? ? MySQL_BindResultFloat(stmt_readloop, 1, spawnX);

? ? MySQL_BindResultFloat(stmt_readloop, 2, spawnY);

? ? MySQL_BindResultFloat(stmt_readloop, 3, spawnZ);

? ? MySQL_BindResultFloat(stmt_readloop, 4, spawnA);



? ? while(MySQL_Statement_FetchRow(stmt_readloop)) {

? ? ? ? printf("%i, %.3f, %.3f, %.3f", spawnID, spawnX, spawnY, spawnZ, spawnA);

? ? }

? ? MySQL_StatementClose(stmt_readloop);

}

MySQL_ExecuteThreaded_Inline(stmt_readloop, using inline OnSpawnsLoad);



Writing Data

Code:
new Statement: stmt_insert = MySQL_PrepareStatement(MySQLHandle, "INSERT INTO accounts(username, password, salt, money, kills, deaths) VALUES (?,?,?,?,?,?) " );



// Arrow values in questions (first 0, second is 1, etc ...)

MySQL_Bind(stmt_insert, 0 , "patrickgtr");

MySQL_Bind(stmt_insert, 1 , "patrickgtrpassword");

MySQL_Bind(stmt_insert, 2 , "pgtrhash");

MySQL_BindInt(stmt_insert, 3, 100);

MySQL_BindInt(stmt_insert, 4, 200);

MySQL_BindInt(stmt_insert, 5, 300);



MySQL_ExecuteParallel(stmt_insert);

MySQL_StatementClose(stmt_insert);



Functions



Open/Close

Code:
MySQL_StatementClose(Statement:statement)

MySQL_PrepareStatement(MySQL:handle, const query[])

MySQL_Statement_RowsLeft(&Statement:statement)

MySQL_Statement_FetchRow(Statement:statement)



Writing

Code:
MySQL_Bind(Statement:statement, param, const str[])?

MySQL_BindInt(Statement:statement, param, value)

MySQL_BindFloat(Statement:statement, param, Float:value)



Reading

Code:
MySQL_BindResult(Statement:statement, field, const result[], len = sizeof(result))

MySQL_BindResultInt(Statement:statement, field, &result)

MySQL_BindResultFloat(Statement:statement, field, &Float:result)



Executing

Code:
MySQL_ExecuteThreaded(Statement:statement, const callback[] = "", const fmat[] = "", {Float,_}:...)

MySQL_ExecuteParallel(Statement:statement, const callback[] = "", const fmat[] = "", {Float,_}:...)

MySQL_ExecuteThreaded_Inline(Statement:statement, Func:callback<>)

MySQL_ExecuteParallel_Inline(Statement:statement, Func:callback<>)


  How can regular PAWN scripter contribute?
Posted by: Logan - 2019-06-07, 04:39 PM - Forum: Questions and Suggestions - Replies (4)

Hello to everyone on this forum.



I've stumbled across this marvelous page project, and first of all, I would like to thank Y_Less, Southclaws and many other people that I don't know, that came trough with this project. I am huge fan of their work for more then a decade, since I touched PAWN first time.



I will share you little bit of my details so you can tell me who to contact/how to contribute. I've been scripting actively in PAWN since 2008/2009(currently I am 24 years old), stopped 2013(college), continued 2018 untill present. When I returned last year, I fixed at least 10 000 bugs?on my gamemode(from the smallest to biggest, regarding MySQL, timers, server crashes, and hardcore cheaters who managed to turn off outgoing packages). We even managed to defend ourselves from DDoSers and flooders, but, none of that would be possible without forums and knowledge that many of you shared on SAMP forums. So I'll use this chance to thank all of you that contributed with your knowledge which helped me become even better at scripting. We've been using YSI for almost a decade, literally marvelous library, and I would dare to say subculture of PAWN langauge that countinues to be awesome.



So with everything said, since this is my first day here and that I heard about this whole project, how can I contribute? 10 mins ago, I told Y_Less, and I'm gonna say it again, I plan to contribute as much of my free time as possbile on this project, so show me the way.



Also, another "side question". Does open.mp plan to have custom objects/vehicles/animations/skins?



Thank you for spending time reading my post, hope I didn't bother you. Cheers! :D


Shocked y_hooks multiple includes
Posted by: iReal Worlds - 2019-06-07, 03:54 PM - Forum: Pawn Scripting - Replies (3)

I have a problem using y_hooks:

I have the main gamemode (main.pwn), and two "modules" that are included in it: "module1.inc" and "module2.inc".



In both of them, I have to use y_hooks. From what I knew, you had to reinclude y_hooks if you wanted to hook to the same function, so at top of each module, I have

Code:
#include "..\include\YSI\y_hooks.inc"

But I get a "symbol already defined" error in "module2" for the callbacks that have already been hooked to in the first one.


  physics.inc
Posted by: Peppe - 2019-06-07, 02:01 PM - Forum: Libraries - Replies (9)

PHYSICS.INC



Introduction

Hello gamers, I have to be honest, I'm not touching anything SA-MP related from more than 2 years, but today I've got a bit nostalgic and just?discovered the?Open-MP project.



This physics.inc (or Objects Physics) library is a project I worked to in 2013, and it would be nice for someone to revive that, if Open-MP developers can help mitigate?the network?problems (too many acks)?that a constantly updating physics simulation gives. As you can notice, it's been a lot of years since I worked on this project, so forgive me if I'll not be detailed enough or write something incorrect. Also,



Physics.inc is a very basic implementation of projectile physics in SA-MP, allowing to handle the 2D or 3D movement of objects (ideally, balls), collisions, or even interacting with the San Andreas world, thanks to the?ColAndreas plugin.



Github

https://github.com/uPeppe/physics.inc



Library dependencies

modelsizes.inc

foreach.inc?

ColAndreas (not mandatory)

zcmd (only for pool, but it's easy to switch to another command processor)



Documentation

Code:
PHY_InitObject(objectid, modelid = 0, Float:mass = 1.0, Float:size = FLOAT_NAN, mode = PHY_MODE_3D)

/*Starts using physics for objectid.

modelid - object's modelid, used to get its size with modelsizes include.

mass - object's mass, it is like its weight and is used in collisions.

size - object's sphere radius, taken from modelsizes.inc by default.

mode - PHY_MODE_3D or PHY_MODE_2D.*/



PHY_GetObjectMode(objectid)



PHY_DeleteObject(objectid)

/*Stops using physics for objectid (doesn't destroy it).*/



PHY_SetObjectVelocity(objectid, Float:vx, Float:vy, Float:vz = 0.0)

/*Moves the object with vx, vy, vz velocities.*/



PHY_GetObjectVelocity(objectid, &Float:vx, &Float:vy, &Float:vz)



PHY_IsObjectMoving(objectid)



PHY_SetObjectAcceleration(objectid, Float:ax, Float:ay, Float:az = 0.0)

/*Sets the object's acceleration.*/



PHY_GetObjectAcceleration(objectid, &Float:ax, &Float:ay, &Float:az)



PHY_GetObjectSpeed(objectid, &Float:speed, _3D = 0)



PHY_GetObjectMoveAngle(objectid, &Float:moveangle)



stock PHY_RollObject(objectid, toggle = 1, rollingmode = PHY_ROLLING_MODE_DEFAULT)

/* Starts rolling the object when it moves of toggle = 1 or stops if toggle = 0.

rollingmode = PHY_ROLLING_MODE_DEFAULT (Euler angles) or PHY_ROLLING_MODE_ADVANCED (Quaternions)

When using advanced rolling mode, if you manually use SetObjectRot in your script, it is adviced to

call PHY_RollObject again, in order to recalculate its quaternion angles.*/





PHY_IsObjectRolling(objectid)



PHY_SetObjectFriction(objectid, Float:friction)

/*Applies friction to the object when it moves on the floor (at its lowest Z). If friction is applied, the object gradually slows down.*/



Float:PHY_GetObjectFriction(objectid)



PHY_SetObjectAirResistance(objectid, Float:resistance)

/*Applies air resistance to the object when it moves. The difference between friction and air resistance is that the former works only if the object is on the floor and the letter is also slows down the object proportionally to its velocity.*/



Float:PHY_GetObjectAirResistance(objectid)



PHY_SetObjectZBound(objectid, Float:low = FLOAT_NAN, Float:high = FLOAT_NAN, Float:constant = 0.0)

/*Limits the object's Z position.

low - The lowest Z that the object can have (you can use FLOAT_NEG_INFINITY). If it is set to NaN it doesn't change.

high - The highest Z that the object can have (you can use FLOAT_INFINITY). If it is set to NaN it doesn't change.

(When you use PHY_InitObject lowest Z is set to the current object's Z and highest Z to FLOAT_INFINITY.

constant - It should be from 0.0 to 1.0. If it is 1.0 the object doesn't lose velocity,

if it is 0.0 the object stops when it bounces. It could be a middle ground.*/



PHY_SetObjectGravity(objectid, Float:gravity)

/*Sets the gravity's acceleration that the object is subjected to.*/



Float:PHY_GetObjectGravity(objectid)



PHY_SetObjectWorld(objectid, world)

/*Object and walls collide only if the are in the same world or one of them is in the world 0 (default).*/



PHY_ToggleObjectPlayerColls(objectid, toggle = 1, Float:constant = 1.0, Float:distoffset = 0.8, Float:zoffsetlow = 1.0, Float:zoffsethigh = 1.0)

/*Toggles object's collisions with players.

- constant - It should be from 0.0 to 1.0. If it is 1.0 the object doesn't lose velocity,

if it is 0.0 the object stops when it bounces. It could be a middle ground.

- distoffset - The distance at which the object collides with the player.

- zoffsetlow/zoffsethigh - The max Z distance (downward/upward) at which the object collides with the player.*/



PHY_ApplyRotation(objectid, Float:speed, Float:moveangle)

/*Function used internally to rotate the objects.*/



PHY_CreateWall(Float:x1, Float:y1, Float:x2, Float:y2, Float:constant = 1.0, Float:low = FLOAT_NEG_INFINITY, Float:high = FLOAT_INFINITY)

/*Creates a collision wall (straight line) from A(x1, y1) to B(x2, y2).

constant should be from 0.0 to 1.0. If it is 1.0 the object doesn't lose velocity,

if it is 0.0 the object stops when it collides.

low is the lowest wall's Z, high is the highest. If they're set to default the wall is like infinitely high. */



PHY_CreateArea(Float:minX, Float:minY, Float:maxX, Float:maxY, Float:constant = 1.0, Float:low = FLOAT_NEG_INFINITY, Float:high = FLOAT_INFINITY)

/*Creates four walls that form an area. Works like IsPlayerInArea.*/



PHY_DestroyWall(wallid)



PHY_SetWallWorld(wallid, world)



PHY_CreateCylinder(Float:x, Float:y, Float:size, Float:constant = 1.0, Float:low = FLOAT_NEG_INFINITY, Float:high = FLOAT_INFINITY)

/*Creates a collision cylinder at position x, y.

constant should be from 0.0 to 1.0. If it is 1.0 the object doesn't lose velocity,

if it is 0.0 the object stops when it collides.

low is the lowest cylinder's Z, high is the highest. If they're set to default the cylinder is like infinitely high.*/



PHY_DestroyCylinder(cylinderid)



PHY_SetCylinderWorld(cylinderid, world)



PHY_SetPlayerWorld(playerid, world)



PHY_UseColAndreas(objectid, mode = 1)

/* Sets ColAndreas mode for the object. Modes: 0 none, 1 collisions  z bounds, 2 collisions only, 3 z bounds only */



/* Callbacks */

forward PHY_OnObjectUpdate(objectid);

forward PHY_OnObjectCollideWithObject(object1, object2);

forward PHY_OnObjectCollideWithZBound(objectid, lowhigh); // low bound = 0, high bound = 1

forward PHY_OnObjectCollideWithSAWorld(objectid, Float:cx, Float:cy, Float:cz); // Only with ColAndreas

forward PHY_OnObjectCollideWithWall(objectid, wallid);

forward PHY_OnObjectCollideWithCylinder(objectid, cylinderid);

forward PHY_OnObjectCollideWithPlayer(objectid, playerid);





ColAndreas support

ColAndreas plugin by Pottus and Crayder allows to calculate collisions with every object in San Andreas map and to constantly update the low and high Z bound of the object that uses physics.?



If you want to use ColAndreas features (PHY_UseColAndreas and PHY_OnObjectCollideWithSAWorld), put "#define COLANDREAS" before including "physics.inc".



Warning: the interaction between this library and ColAndreas might be inefficient and very code-time consuming!?



Examples

In gamemodes folder of the Github repository, you can find some examples of what you can do with this library.


  • Pool. It's the perfect example of 2D Physics, with balls that can collide between themselves or?with walls.?Press LMB to hold the ball.Press RMB to shot/pass the ball. Press ALT to lob the ball. Press F to make a cross/high shot.?Hit the ball (press RMB/ALT/F) when it is at head height to make a header. Power bar when you are holding RMB/ALT/F.

    [Video: https://www.youtube.com/watch?v=yOtlNQvgJ6Q]

  • Soccer. Here physics are 3D (z-axis is used). This script also uses the "collision cylinder" feature, for the goal post.

    [Video: https://www.youtube.com/watch?v=ISTebVTMYog]

  • Throw an object. A more simple example of of 3D physics, with a command to just throw a Deagle in the air.

    Code:
    command(launch, playerid, params[])

    {

    #define SPEED (10.0)

    #define Z_SPEED (4.0)

    #define GRAVITY (13.0)

    ? ? ? ? new modelid = 348; // Deagle Model ID

    new Float:x, Float:y, Float:z, Float:ang;

    GetPlayerPos(playerid, x, y, z);

    GetPlayerFacingAngle(playerid, ang);

    new obj = CreateObject(modelid, x, y - 0.5 * floatcos(-(ang  90.0), degrees), z, 93.7, 120.0, ang  60.0);

    ? PHY_InitObject(obj);

    PHY_SetObjectVelocity(obj, SPEED * floatsin(-ang, degrees), SPEED * floatcos(-ang, degrees), Z_SPEED);

    PHY_SetObjectFriction(obj, 100); // This will stop the object when it touchs the ground.

    PHY_SetObjectGravity(obj, GRAVITY);

    PHY_SetObjectZBound(obj, z - 1.0, _, 0.0);

    ApplyAnimation(playerid,"GRENADE","WEAPON_throwu",3.0,0,0,0,0,0);

    return 1;

    }

  • ColAndreas testing.

    [Video: https://www.youtube.com/watch?v=QKHDK_vogYE]




Appreciated contributions?

I don't even have GTA San Andreas on my computer, so it would be hard for me to update this library. I have a list of things that are very easy to do:

  1. Update physics.inc with the latest library dependencies versions (but still keeping compatibility with the older ones).

    The code is very old, so I used old version of the libraries modelsizes, foreach and ColAndreas. For example, I think no one uses foreach now, but use instead?Y_Iterate. Also, I don't know if the current ColAndreas version works well with the include, because at the time I used one of the first versions.

  2. Implement a more advanced object rolling.?DONE

    With the way the actual code works, the rolling of a ball is not so realistic, because, when an object changes its direction of movement,?the RZ angle is instantly changed to match that direction.A more realistic way to roll objects should use operations on quaternions, instead of Euler angles. In the past, I try to use that, but it didn't work. In 2016, a chinese guy on SA-MP forum managed to fix that and here's the code: https://mega.nz/#!38QlGaLb!uinmaqDDaTjha...WkP3ubLLYI (version of physics.inc that rolls objects using quaternions). It would be nice if you implement part of his code, in order to have two options of rolling objects, with a function like PHY_SetObjectRollingMode: ROLLING_MODE_DEFAULT for the more simple one I wrote and ROLLING_MODE_ADVANCED?for the quaternions one. In order to do that, you modify the?PHY_ApplyRotation function.This is how the ROLLING_MODE_DEFAULT should look: https://www.youtube.com/watch?v=Kbkm4fXaB7Q. This is how the ROLLING_MODE_ADVANCED should look: https://www.youtube.com/watch?v=xl5Vbd2tfwM. As you can see, the problem of the first one is the sudden change of rotation when two balls collide and thus change their direction of movement.

Submit a pull request on Github if you want to contribute and please write in this topic. I'll appreciate a lot if someone helps cleaning this least.


  PAYDAY $A:MP - Armored Transport Heist & Drills!
Posted by: TheSlenderman - 2019-06-07, 01:30 AM - Forum: Videos and Screenshots - No Replies

[Image: smt3fyl.png]

Enjoy!

Video Presentation
https://www.youtube.com/watch?v=c_uaGU2qHiE