SA-MP Forums Archive
Save Reason & Playerid - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Save Reason & Playerid (/showthread.php?tid=645479)



Save Reason & Playerid - pulsare - 27.11.2017

Hey,

I just wanna know how to save a Reason or Playerid Name in a for example Ban Command.

The PlayerName(the playerid who banned the player)

and the Reason(why) and how to get them later ?

Like a Banreason when the Player connects (in another public then) "Your account was banned, reason: (reason) admin: (admin)


ocmd:dc(playerid,params[])
{

new pid,reason[31];
if(sscanf(params,"us", pid, reason))


Re: Save Reason & Playerid - Meller - 27.11.2017

Would you like to only save it for a logging or also load the data later?


Re: Save Reason & Playerid - pulsare - 27.11.2017

Quote:
Originally Posted by Meller
Посмотреть сообщение
Would you like to only save it for a logging or also load the data later?
yes Like I explained its like a Banreason that is getting saved and the Player gets this Message (reason)


Re: Save Reason & Playerid - Lucases - 27.11.2017

Do you have a login/register system?


Re: Save Reason & Playerid - pulsare - 27.11.2017

Quote:
Originally Posted by Lucases
Посмотреть сообщение
Do you have a login/register system?
yes I have


Re: Save Reason & Playerid - Lucases - 27.11.2017

What do you use? y_ini or Sqlite?


Re: Save Reason & Playerid - Daymen - 28.11.2017

I'd recommend upgrading to MYSQL as it's more efficient and will provide a lot more 'clean' opportunities in the future.

I know there's a few guides throughout the forums. (This also helps in the future if you want to provide a UCP for your players.)


Re: Save Reason & Playerid - Lucases - 28.11.2017

Or switch to Sqlite which is included in SA:MP server folder already and doesn't need a lot of time to learn it.
It doesn't need weird and big programs like WAMP to work because it's portable.


Re: Save Reason & Playerid - pulsare - 28.11.2017

I dont wanna switch, not yet.

Can someone help me at this?


Re: Save Reason & Playerid - OneDay - 28.11.2017

Quote:
Originally Posted by pulsare
Посмотреть сообщение
I dont wanna switch, not yet.

Can someone help me at this?
Do you want to switch later when you have more code? Switch now when it is very easy.