Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 7,501
» Latest member: ae888vnio
» Forum threads: 2,413
» Forum posts: 12,360
Full Statistics
|
Online Users |
There are currently 602 online users. » 0 Member(s) | 600 Guest(s) Bing, Google
|
Latest Threads |
San Fierro Cops And Robbe...
Forum: Advertisements
Last Post: Dr0pp
Yesterday, 08:33 PM
» Replies: 0
» Views: 49
|
Adding new vehicles and s...
Forum: Programming
Last Post: __.A.__
2025-09-12, 07:47 PM
» Replies: 0
» Views: 73
|
Zona América del Sur Free...
Forum: Advertisements
Last Post: kevinberriosflores
2025-09-12, 02:16 PM
» Replies: 1
» Views: 99
|
Busco copia de gamemode S...
Forum: Spanish/Espa?ol
Last Post: briancristaldo2021
2025-09-11, 11:14 AM
» Replies: 0
» Views: 86
|
[Tutorial] Registrando o ...
Forum: Portuguese/Portugu?s
Last Post: Crazy_ArKzX
2025-09-09, 08:36 PM
» Replies: 0
» Views: 227
|
San Andreas Police Pursui...
Forum: Advertisements
Last Post: BriBri
2025-09-08, 10:09 PM
» Replies: 1
» Views: 312
|
Problem with plugins load...
Forum: Support
Last Post: MrKacu13
2025-09-08, 07:15 PM
» Replies: 9
» Views: 405
|
Compilation error
Forum: Pawn Scripting
Last Post: MrKacu13
2025-09-07, 07:18 AM
» Replies: 6
» Views: 380
|
Need help, problem when i...
Forum: Programming
Last Post: nonickowned
2025-09-06, 06:21 PM
» Replies: 0
» Views: 165
|
Transfer server from SAMP...
Forum: Support
Last Post: MrKacu13
2025-09-06, 04:03 PM
» Replies: 1
» Views: 266
|
|
|
[FIXED] can't run many timers, that are not working with backtrace notification. |
Posted by: PutuSuhartawan - 2021-03-23, 03:59 PM - Forum: Pawn Scripting
- Replies (4)
|
 |
Quote:Change to
SetTimerEx("PublicOwned", 1000, true, "i", playerid);
sorry, I am confused about the mistake where when I install a lot of timer functions it can't work. I also can't run the isvalidtimer function because that include is empty. is there a way to install the correct include timerfix?
Quote:Does not work if it repeats:
SetTimer ("TimeServer", 500, true);
SetTimer ("Change_Color", 5000, true);
will run if one call:
SetTimer ("UnFreezeMe", 3000.0);
|
|
|
Whitelist System |
Posted by: Genon_May - 2021-03-23, 08:42 AM - Forum: General Discussions
- Replies (3)
|
 |
Hey, im wondering does anyone know where i can find a whitelist system for samp. There used to be a few on the samp forums but cant reach them right now since they are down. If anyone knows where i can find one (english version) i would be very grateful
|
|
|
A tool/program for finding unmatched brackets? |
Posted by: Fawkes - 2021-03-22, 06:10 PM - Forum: Pawn Scripting
- Replies (4)
|
 |
I'm trying to optimize a script i made a few years ago and seperate it into libraries, i'm re-compiling it after every couple of changes to try and make it as easy as possible to identify errors and mistakes as i go along.
At the moment it won't compile (using pawno) unless i scroll to the bottom of the script first and compile from there (no errors or warnings if i don't scroll to the bottom first, it just doesn't create a working AMX unless i scroll to the bottom before compiling), i've checked the brackets with ctrl F and i've got 3 unmatched brackets (from years ago) which i remember used to cause the same problem in the past.
Does anyone know of any online web programs or software to highlight where unmatched bracket openings/closings begin/end without having to disect the whole script piece-by-piece to narrow down the lines manually?
I've tried searching for something to do this but they just give a long list of errors/warnings unrelated to brackets because they're intended for non-pwn.
Any help or suggestions would be great.
|
|
|
sqlite and inputtext |
Posted by: robertocaribbean - 2021-03-21, 05:42 PM - Forum: Pawn Scripting
- Replies (6)
|
 |
I am trying to create an SQLite database, I only have three variables to keep it simple.
The problem is that the password is not saved unless I pass <inputtext> directly to the query.
Variables:
Code: enum USER_DATA {
? ? USER_ID,
? ? USER_NICKNAME[MAX_PLAYER_NAME],
? ? USER_PASSWORD[20]
};
new gUserData[MAX_PLAYERS][USER_DATA];
Code working:
Code: public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
? ? switch (dialogid) {
? ? ? ? case DIALOG_REGISTRATION: {
? ? ? ? ? ? if (!response) return Kick(playerid);
? ? ? ? ? ? if (!(3 <= strlen(inputtext) <= 20)) {
? ? ? ? ? ? ? ? SendClientMessage(playerid, -1, "Tu contrase?a debe tener entre 3 y 20 car?cteres");
? ? ? ? ? ? ? ? ShowPlayerDialog(playerid, DIALOG_REGISTRATION, DIALOG_STYLE_PASSWORD, "Register", "Type in a password below to register an account.", "Register", "Leave" );
? ? ? ? ? ? ? ? return 1;
? ? ? ? ? ? }
? ? ? ? ? ? new query[208], DBResult: result;
? ? ? ? ? ?
? ? ? ? ? ? format(query, sizeof query, "INSERT INTO users (nickname, password) VALUES ('%q', '%s')", gUserData[playerid][USER_NICKNAME], inputtext);
? ? ? ? ? ? db_query(db_handle, query);
? ? ? ? ? ? SendClientMessage(playerid, 0x00FF00FF, "[SERVER]: You have just registered to our server! You have been automatically logged in!");
? ? ? ? ? ? result = db_query(db_handle, "SELECT last_insert_rowid()");
? ? ? ? ? ? gUserData[playerid][USER_ID] = db_get_field_int(result);
? ? ? ? ? ? db_free_result(result);
? ? ? ? }
? ? }
? ? return 1;
}
Code isn't working:
Code: gUserData[playerid][USER_PASSWORD] = inputtext[strlen(inputtext)];? ? ? ? ? ?
? ? ? ? ? ? format(query, sizeof query, "INSERT INTO users (nickname, password) VALUES ('%q', '%s')", gUserData[playerid][USER_NICKNAME], gUserData[playerid][USER_PASSWORD]);
The password field on the database is empty, and other values are ok. No error has given from the compiler.
|
|
|
How to save the position of a car? |
Posted by: Boxi - 2021-03-21, 11:45 AM - Forum: Pawn Scripting
- Replies (1)
|
 |
Hello everyone :'D?
Would anyone know how to make a system to save the position of a car? where the player leaves his car somewhere and when he connects again the car is there, basically how is the saving of the player's position. Obviously I'm not asking for any of you to write that code, just an idea of where I should start if I wanted to do it. Greetings to all.
|
|
|
mysql_query suggest |
Posted by: Zow - 2021-03-19, 09:49 PM - Forum: Pawn Scripting
- Replies (4)
|
 |
How can I?improve this code?
PHP Code: Account_PromptLogin(playerid) {
? ? new
? ? ? ? query[81],
? ? ? ? playerHash[62],
? ? ? ? playerDate[11],
? ? ? ? playerTime[9],
? ? ? ? playerIP[16],
? ? ? ? rows;
? ? mysql_format(MySQL_GetHandle(), query, sizeof query,
? ? "\
? ? ? ? SELECT * FROM `players` WHERE `username` = '%e' LIMIT 1\
? ? ",
? ? ? ? Player_GetName(playerid)
? ? );
? ? mysql_query(MySQL_GetHandle(), query);
? ? cache_get_row_count(rows);
? ? if (!rows) {
? ? ? ? Player_Kick(playerid);
? ? ? ? return 0;
? ? }
? ? cache_get_value_name(0, "password", playerHash, sizeof(playerHash));
? ? cache_get_value_name(0, "date_reg", playerDate, sizeof(playerDate));
? ? cache_get_value_name(0, "time_reg", playerTime, sizeof(playerTime));
? ? cache_get_value_name(0, "ip", playerIP, sizeof(playerIP));
? ? Player_SetAccountHash(playerid, playerHash);
? ? Player_SetAccountDate(playerid, playerDate);
? ? Player_SetAccountTime(playerid, playerTime);
? ? Player_SetAccountIP(playerid, playerIP);
? ? Dialog_ShowCallback(playerid,
? ? ? ? using public Account_Login<iiiis>,
? ? ? ? DIALOG_STYLE_PASSWORD,
? ? ? ? SERVER_NAME,
? ? ? ? "Welcome",
? ? ? ? "Login",
? ? ? ? "Exit"
? ? );
? ? return 1;
}
forward Account_Login(playerid, dialogid, response, listitem, string:inputtext[]);
public Account_Login(playerid, dialogid, response, listitem, string:inputtext[]) {
? ? if (response) {
? ? ? ? bcrypt_verify(playerid, "OnPasswordVerify", inputtext, Player_GetAccountHash(playerid));
? ? }
? ? else {
? ? ? ? Kick(playerid);
? ? }
? ? return 1;
}
PHP Code: forward OnPasswordVerify(playerid, bool:success);
public OnPasswordVerify(playerid, bool:success) {
? ? if (success)
? ? {
? ? ? ? CallLocalFunction("OnPlayerLogin", "d", playerid);
? ? }
? ? else
? ? {
? ? ? ? Account_PromptLogin(playerid);
? ? }
}
|
|
|
|