SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Gamemode Scripts

Reply
 
Thread Tools Display Modes
Old 24/07/2019, 09:48 PM   #11
kukboy
Big Clucker
 
kukboy's Avatar
 
Join Date: Nov 2018
Posts: 57
Reputation: 6
Default Re: Very Basic Script

What's the problem though?
kukboy is offline   Reply With Quote
Old 25/07/2019, 08:59 AM   #12
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 446
Reputation: 12
Default Re: Very Basic Script

Perfect for people who are learning to script!
Josh_Main is offline   Reply With Quote
Old 25/07/2019, 09:23 AM   #13
GTLS
High-roller
 
GTLS's Avatar
 
Join Date: Aug 2014
Location: India
Posts: 1,072
Reputation: 119
Default Re: Very Basic Script

Quote:
Originally Posted by Mobtiesgangsa View Post
GTLS You dont becouse you never visited forum very often

check Solstice_s page he made one with both bCrypt and Whirlpool

Bcrypt concept
Wow you know more about me than me.. haha anyways, thanks for pointing out that for me.

Quote:
Originally Posted by kukboy View Post
Very helpful for beginners.
Quote:
Originally Posted by Josh_Main View Post
Perfect for people who are learning to script!
Thank you

Quote:
Originally Posted by Kane View Post
Not really helpful. I wouldn't recommend this to anyone, especially if they're just learning.
Quote:
Originally Posted by kukboy View Post
What's the problem though?
Exactly? I havent use any kind of complicated logic in the script which would confuse first timers..
__________________

I don't help for rep. I help cuz I was helped in the past.


Retired from SAMP Scene. Might open SAMP Forums once in a while.

Some treats for ya. Click em
Basic House System
Simple Speedo
Base Login/Register Script

GTLS is offline   Reply With Quote
Old 25/07/2019, 12:49 PM   #14
Huemerson
Little Clucker
 
Huemerson's Avatar
 
Join Date: Apr 2018
Location: Brasil - Minas Gerais
Posts: 36
Reputation: 1
Default Re: Very Basic Script

Good script, thanks.
Huemerson is offline   Reply With Quote
Old 25/07/2019, 01:10 PM   #15
sonn51280
Big Clucker
 
sonn51280's Avatar
 
Join Date: Jun 2017
Location: Vietnamese
Posts: 72
Reputation: 0
Default Re: Very Basic Script

can you send github me?

Quote:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.DL-R1, (C)2005-2018 SA-MP Team

[20:12:05] filterscripts = "" (string)
[20:12:05]
[20:12:05] Server Plugins
[20:12:05] --------------
[20:12:05] Loading plugin: mysql
[20:12:05] >> plugin.mysql: R41-4 successfully loaded.
[20:12:05] Loaded.
[20:12:05] Loaded 1 plugins.

[20:12:05]
[20:12:05] Filterscripts
[20:12:05] ---------------
[20:12:05] Loaded 0 filterscripts.

[20:12:05] Script[gamemodes/lsc.amx]: Run time error 19: "File or function is not found"
[20:12:05] Number of vehicle models: 0
sonn51280 is offline   Reply With Quote
Old 25/07/2019, 02:02 PM   #16
ZigGamerx
Huge Clucker
 
Join Date: Jul 2018
Posts: 208
Reputation: 25
Default Re: Very Basic Script

Quote:
Originally Posted by sonn51280 View Post
can you send github me?
Yo brother, use native checker plugin and then restart the server with it, then post the logs here.
ZigGamerx is offline   Reply With Quote
Old 27/07/2019, 09:23 AM   #17
GTLS
High-roller
 
GTLS's Avatar
 
Join Date: Aug 2014
Location: India
Posts: 1,072
Reputation: 119
Default Re: Very Basic Script

Quote:
Originally Posted by sonn51280 View Post
can you send github me?
Check the releases on the github. I had shared a zip with all binaries required for the script.

Problem you have is you are missing plugin bcrypt-samp. Either download it from forums or download zip from releases tab on github.s
__________________

I don't help for rep. I help cuz I was helped in the past.


Retired from SAMP Scene. Might open SAMP Forums once in a while.

Some treats for ya. Click em
Basic House System
Simple Speedo
Base Login/Register Script

GTLS is offline   Reply With Quote
Old 04/08/2019, 02:36 PM   #18
PhantomThief1412
Little Clucker
 
Join Date: May 2018
Posts: 6
Reputation: 4
Default Re: Very Basic Script

Quote:
Originally Posted by Kane View Post
Not really helpful. I wouldn't recommend this to anyone, especially if they're just learning.
LOL you dont know how to appreciate good work.. Good work GTLS
PhantomThief1412 is offline   Reply With Quote
Old 04/08/2019, 06:39 PM   #19
ZigGamerx
Huge Clucker
 
Join Date: Jul 2018
Posts: 208
Reputation: 25
Default Re: Very Basic Script

Quote:
Originally Posted by Kane View Post
Not really helpful. I wouldn't recommend this to anyone, especially if they're just learning.
This is a very basic script, this is more easy for newbies to learn MySQL easily. Who cares if you are a good scripter, learn to respect other works.

No Hate!! Just Truth.

Good work GTLS.
ZigGamerx is offline   Reply With Quote
Old 05/08/2019, 01:20 PM   #20
SiaReyes
Gangsta
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 618
Reputation: 57
Default Re: Very Basic Script

Quote:
Originally Posted by ZigGamerx View Post
This is a very basic script, this is more easy for newbies to learn MySQL easily. Who cares if you are a good scripter, learn to respect other works.

No Hate!! Just Truth.

Good work GTLS.
Kane was right, if you had read the whole script, you could have spotted some issues.

Mysql connection wasn't close at OnGameModeExit.
Player Name is stored in database but no idea why it was not used in script instead using GetPlayerName everytime!
`Users` and `USERS` should be `users` in onplayerconnect and OnPlayerDisconnect callback!


There is no need to login after the player register. It can be done by
pawn Code:
forward OnPlayerRegister(playerid);
public OnPlayerRegister(playerid)
{
         pInfo[playerid][MasterID] = cache_insert_id();
         pInfo[playerid][PX] = 1527.85;
         pInfo[playerid][PY] = -1675.35;
         pInfo[playerid][PZ] = 13.3828;
         pInfo[playerid][ROOT] = 270;
         pInfo[playerid][Skin] = 1;
         pInfo[playerid][Level] = 1;
    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);
    SendClientMessage(playerid, 0x0033FFFF /*Blue*/, "Thank you for registering! You will be spawned now!");
    TogglePlayerSpectating(playerid, false);
    TogglePlayerControllable(playerid, true);
        SpawnPlayer(playerid);
    return 1;
}

And the last thing is , No Login detection was checked when player disconnect and no player variable for login check is defined.
When player disconnect, you should check if player logged in (after login/register) , so the data will be saved in mysql.
What if a player logins with an another player name and exist the server (Calls OnPlayerDisconnect)? or what if a player mistype his password and kicked out?
It will save the player's current position and will be stored into the database under the player name. So, that's why the script needs a login variable.

Anyways Good work!
SiaReyes is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] Gang War - Basic script Matnix Gamemode Scripts 19 10/08/2017 08:55 AM
Basic 'Skeleton' Rp script JamesStryker Scripting Help 3 16/08/2013 08:23 PM
Script error - Please help, really basic. Kyle. Scripting Help 11 19/11/2011 06:11 AM
Help with very basic script cazz21 Help Archive 4 20/05/2011 12:33 PM
[Request] Basic Script Matthew_Murdoch Help Archive 3 27/08/2009 03:17 PM


All times are GMT. The time now is 05:13 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.