| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 7,701
» Latest member: zein97174
» Forum threads: 2,356
» Forum posts: 12,303
Full Statistics
|
| Online Users |
There are currently 295 online users. » 0 Member(s) | 292 Guest(s) Google, Bing, Baidu
|
| Latest Threads |
Client issue with object
Forum: Support
Last Post: TheDoctor
2025-11-15, 08:00 PM
» Replies: 0
» Views: 41
|
San Andreas Police Pursui...
Forum: Advertisements
Last Post: BriBri
2025-11-15, 12:06 AM
» Replies: 0
» Views: 46
|
[Include] OpenGate (Abrir...
Forum: Portuguese/Portugu?s
Last Post: Crazy_ArKzX
2025-11-13, 06:49 PM
» Replies: 0
» Views: 40
|
OpenGate (Open Proximity ...
Forum: Libraries
Last Post: Crazy_ArKzX
2025-11-13, 06:46 PM
» Replies: 0
» Views: 49
|
LS City Hall
Forum: Maps
Last Post: cosminupgaming
2025-11-12, 04:22 PM
» Replies: 3
» Views: 2,674
|
Crime Base
Forum: Maps
Last Post: cosminupgaming
2025-11-12, 04:19 PM
» Replies: 2
» Views: 1,262
|
GTA SA-MP Scripting: Issu...
Forum: General Discussions
Last Post: williamrhein
2025-11-12, 10:16 AM
» Replies: 0
» Views: 61
|
is it worth creating a se...
Forum: General Discussions
Last Post: cosminupgaming
2025-11-11, 05:30 PM
» Replies: 13
» Views: 18,377
|
Looking for an English De...
Forum: General Discussions
Last Post: cosminupgaming
2025-11-11, 05:21 PM
» Replies: 2
» Views: 2,825
|
Awakeninga an old server.
Forum: Support
Last Post: drwnrbbt
2025-11-11, 02:26 PM
» Replies: 0
» Views: 60
|
|
|
| Invalid expression |
|
Posted by: Viola - 2019-11-06, 10:18 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
I have a problem when converting FS:
PHP Code: filterscripts\vc_minimap.pwn(52) : error 029: invalid expression, assumed zero
That's this line:
PHP Code: PlayerText:pVcMinimapTextdraws[MAX_PLAYERS][3] = ?{{ PlayerText:INVALID_TEXT_DRAW, ...}, ...},
|
|
|
|
| Any news? |
|
Posted by: deepCode - 2019-11-06, 06:52 PM - Forum: Questions and Suggestions
- Replies (4)
|
 |
Hey! We're still waiting for your MP and since Kalcor is fucking up SA:MP 0.3DL we need you as much as we never had. Please, release some news about Open.MP. Approximate release dates, screenshots, anything, please <3
|
|
|
|
| Ie?kau norinciu padet testuoti serveri |
|
Posted by: Tomas - 2019-11-06, 01:10 PM - Forum: Lithuanian/Lietuvi?kas
- Replies (3)
|
 |
Sveiki, ie?kau?keliu ?moniu, norinciu ir galinciu neatlygintinai?kartas nuo karto?padeti testuoti nauja?serveri.?
Kadangi skriptas visi?kai naujas, faktas, kad klaidu yra daugybe?ir reik ?moniu, kurie padetu jas rasti. Lauksiu??inuciu (Discord:?Codoto#1618) ;)?
|
|
|
|
| Team Selection (MySQL) |
|
Posted by: homelessdrop - 2019-11-03, 02:08 PM - Forum: Pawn Scripting
- Replies (2)
|
 |
Hello dier forum member's.
I have a question about a team selection,?specifically in mysql login / register system.
I would like to make coops and robbers selection, after register give selection menu, where u know select of 3 type's, and spawn with it.?
Other about save/load that selected team i can make, just that "after spawn not".
Please, can u help me?
(script is maded by GTLS on samp-forum.?link)
PHP Code: #include <a_samp>
#include <a_mysql> // Currently its R41-4.
#include <bcrypt> //Bcrypt is the best way of encrypting passwords.
#include <foreach> //foreach standalone version
//Defining MySQL stuff here
#define DB_HOST "localhost" //IP of your host. In case of using it on same pc, use localhost or 127.0.0.1
#define DB_NAME "login" //Name of Database you are gonna use.. I have used login, but change it according to your needs.
#define DB_USER "root" //User name of your MySQL client.
#define DB_PASS "" //Password of your MySQL client.
//Default Username is root and password is blank. You still gotta define them
//Make sure to install XAMPP server. Start Apache and MySQL service when you start the server. You can manage SQL databases from PHPMyAdmin which comes in built in XAMPP.
enum //Always use some kind of structure for Dialog IDs.
{
DIALOG_ASK,
DIALOG_REGISTER,
DIALOG_LOGIN
};
enum pinfo
{
MasterID,
Float:PX,
Float:PY,
Float:PZ,
Float:Rot,
Skin,
Level,
bool:LoggedIn
};
new pInfo[MAX_PLAYERS][pinfo];
new MySQL:handle; //This connection handle of data type MySQL is required to carry out Mysql operations.
main()
{
printf("Login Script Loaded");
}
public OnGameModeInit()
{
handle = mysql_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if(mysql_errno(handle) == 0) printf("[MYSQL] Connection successful"); //returns number of errors. 0 means no errors..
else
{
? ?new error[100];
? ?mysql_error(error, sizeof(error), handle);
printf("[MySQL] Connection Failed : %s", error);
}
return 1;
}
public OnGameModeExit()
{
foreach(new i : Player)
{
if(pInfo[i][LoggedIn]) SavePlayerData(i);
}
mysql_close(handle);
return 1;
}
public OnPlayerConnect(playerid)
{
new query[64];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
mysql_format(handle, query, sizeof(query), "SELECT COUNT(Name) from `users` where Name = '%s' ", pname);
mysql_tquery(handle, query, "OnPlayerJoin", "d", playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(pInfo[playerid][LoggedIn]) SavePlayerData(playerid);
pInfo[playerid][LoggedIn] = false;
return 1;
}
public OnPlayerSpawn(playerid)
{
? ?//Set your spawn info here...
return 1;
}
SavePlayerData(playerid)
{
new query[256], pname[MAX_PLAYER_NAME], Float:px, Float:py, Float:pz, Float:rot;
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerPos(playerid, px, py, pz);
GetPlayerFacingAngle(playerid, rot);
mysql_format(handle, query, sizeof(query), "UPDATE `users` set PosX = %f, PosY = %f, PosZ = %f, Rot = %f, Skin = %d, Level = %d WHERE Master_ID = %d", px, py, pz, rot, pInfo[playerid][Skin], pInfo[playerid][Level], pInfo[playerid][MasterID]);
mysql_query(handle, query);
printf("Saved %s's data", pname);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
? ?{
if(response)
{
? ?bcrypt_hash(inputtext, 12, "OnPassHash", "d", playerid);
}
else Kick(playerid);
}
case DIALOG_LOGIN:
{
if(response)
{
new query[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
? ? SetPVarString(playerid, "Unhashed_Pass",inputtext);
mysql_format(handle, query, sizeof(query), "SELECT password, Master_ID from `users` WHERE Name = '%s'", pname);
mysql_tquery(handle, query, "OnPlayerLogin", "d", playerid);
}
else Kick(playerid);
}
}
return 1;
}
forward OnPlayerJoin(playerid);
public OnPlayerJoin(playerid)
{
new rows;
cache_get_value_index_int(0, 0, rows);
if(rows) ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "This account is found on your database. Please login", "Login", "Quit");
else ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "This account not is found on your database. Please register", "Register", "Quit");
return 1;
}
forward OnPlayerRegister(playerid);
public OnPlayerRegister(playerid)
{
SendClientMessage(playerid, 0x0033FFFF /*Blue*/, "Thank you for registering! You can now Login");
? ?ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Thank you for registering! You can now Login with\npassword you just used to register.", "Login", "Quit");
return 1;
}
forward OnPlayerLogin(playerid);
public OnPlayerLogin(playerid)
{
new pPass[255], unhashed_pass[128];
GetPVarString(playerid, "Unhashed_Pass",unhashed_pass,sizeof(unhashed_pass));
if(cache_num_rows())
{
cache_get_value_index(0, 0, pPass);
cache_get_value_index_int(0, 1, pInfo[playerid][MasterID]);
bcrypt_check(unhashed_pass, pPass, "OnPassCheck", "dd",playerid, pInfo[playerid][MasterID]);
? }
? ?else printf("ERROR ");
return 1;
}
forward OnPassHash(playerid);
public OnPassHash(playerid)
{
new pass[BCRYPT_HASH_LENGTH], query[128], pname[MAX_PLAYER_NAME];
? ?GetPlayerName(playerid, pname, sizeof(pname));
? ?bcrypt_get_hash(pass);
? ?mysql_format(handle, query, sizeof(query), "INSERT INTO `users`(Name, Password) VALUES('%s', '%e')", pname, pass);
mysql_tquery(handle, query, "OnPlayerRegister", "d", playerid);
return 1;
}
forward OnPassCheck(playerid, DBID);
public OnPassCheck(playerid, DBID)
{
? ?if(bcrypt_is_equal())
{
SetPlayerInfo(playerid, DBID);
}
else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "The password you just entered is wrong.\nPlease Try again!", "Login", "Quit");
return 1;
}
SetPlayerInfo(playerid, dbid)
{
new query[128];
mysql_format(handle, query, sizeof(query), "SELECT ?PosX, PosY, PosZ, Rot, Skin, Level FROM `users` WHERE Master_ID = %d", dbid);
new Cache:result = mysql_query(handle, query);
cache_get_value_index_float(0, 0, pInfo[playerid][PX]);
cache_get_value_index_float(0, 1, pInfo[playerid][PY]);
cache_get_value_index_float(0, 2, pInfo[playerid][PZ]);
cache_get_value_index_float(0, 3, pInfo[playerid][Rot]);
cache_get_value_index_int(0, 4, pInfo[playerid][Skin]);
cache_get_value_index_int(0, 5, pInfo[playerid][Level]);
pInfo[playerid][LoggedIn] = true;
cache_delete(result);
SetPlayerScore(playerid, pInfo[playerid][Level]);
SetSpawnInfo(playerid, 0, pInfo[playerid][Skin], pInfo[playerid][PX], pInfo[playerid][PY], pInfo[playerid][PZ],pInfo[playerid][Rot], 0, 0, 0, 0, 0, 0);
TogglePlayerSpectating(playerid, false);
TogglePlayerControllable(playerid, true);
new name[MAX_PLAYER_NAME], str[80];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "{00FF22}Welcome to the server, {FFFFFF}%s", name);
SendClientMessage(playerid, -1, str);
DeletePVar(playerid, "Unhashed_Pass");
SpawnPlayer(playerid);
return 1;
}
|
|
|
|
| Protection against map-stealing |
|
Posted by: Mave - 2019-10-31, 04:43 PM - Forum: Questions and Suggestions
- Replies (2)
|
 |
Just hear me out.
Like many of you, I've been playing and creating stuff in SA-MP for over a decade. I've been creating maps since 2008 and still enjoy making these.
However ever since the release of "map stealers" putting out maps on public servers is pretty much pointless because someone can steal your map in no-time and put it in their own server.
A fix or protection for this in open.mp would be... amazing. It would aspire me and many others to start mapping again and not seeing your maps get stolen by others.
Disclaimer: I know many of you couldn't care less about maps (certainly since a lot of servers don't use objects that much), but please do consider my two cents.
|
|
|
|
| Kalcor removing many functions from SA:MP |
|
Posted by: Y_Less - 2019-10-30, 04:53 PM - Forum: Pawn Scripting
- Replies (6)
|
 |
![[Image: nDe1lF7.png]](https://i.imgur.com/nDe1lF7.png)
https://forum.sa-mp.com/showpost.php?p=4...tcount=331
Quote:I'm removing CreateMenu and associated functions from 0.3.9 and future versions because it was added by Y Less and I'd like to eventually remove everything contributed by him.
I haven't come across a server in the last 10 years that uses GTA:SA menus.
Here is a list of things contributed by me. I hope your server doesn't rely on any of them:
- Menus
- Text Draws (except models)
- Per-player objects (how every streamer works)
- Virtual Worlds
- Gang Zones (I think, not 100% on this)
- SetTimerEx
- CallLocalFunction (how many command processors works)
- CallRemoteFunction
- SendPlayerMessage
- ForceClassSelection
- Race checkpoints
- Race checkpoints
- GetPlayerWeaponData
|
|
|
|
|