[HELP]I want to know how to do register with permission - 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: [HELP]I want to know how to do register with permission (
/showthread.php?tid=519642)
[HELP]I want to know how to do register with permission -
Connor Smith - 15.06.2014
I want to know how to do register with permission, player must have permission to register his account, if he dont have permission he cant register his account, anyone help me?
Re: [HELP]I want to know how to do register with permission -
HeLiOn_PrImE - 15.06.2014
permission from who?
permission through what?
Re: [HELP]I want to know how to do register with permission -
Connor Smith - 15.06.2014
Quote:
Originally Posted by HeLiOn_PrImE
permission from who?
permission through what?
|
Look....When someone joins the server, he need to register, but I want to have to get permission first, and then register..Permission from Administrator with some command for example /regperm [ID/Name_Surname]
Re: [HELP]I want to know how to do register with permission -
MacT - 15.06.2014
You need set up UCP or something. Or you can use MySQL aswell, if player connect, sethim to spectating mode. For start scripting you need up to player variable like new Permission[MAX_PLAYERS];. And add to OnPlayerConnect function if[playerid][Permission] == 1 when show register dialog else Kick player.
Re: [HELP]I want to know how to do register with permission -
park4bmx - 15.06.2014
its not that hard if you have a system already ?
a small example
pawn Код:
//variables
new AlloweToReg[MAX_PLAYERS];
public OnPlayerRegsiter(playerid)//what ever your register system is
{
if(AlloweToReg[playerid]==0) return RequestPermission(playerid);
//else continue the registration...
return 1;
}
stock RequestPermission(playerid)// function for the permision
{
new count =0;
AlloweToReg[playerid]=0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPLayerAdmin(i))
{
new Str(40);foramt(Str,sizeof str,"Player: %s (%d) requires permission to register!",GetPlayerName(playerid),playerid);
SendClientMessage(i,-1,STR);
count++;
}
}
if(count==0) return SendClientMessage(playerid,-1,"No Admins Only At The Moment!");
}
//the admin cmd to allow the registration
//Using ZCMD and sscanf
COMMAND:allowregister(playerid, params[])
{
new targetid;if(sscanf(params,"i", targetid)) return SendClientMessage(playerid, -1, "Usage: /AllowRegister [Playerid]");
AlloweToReg[playerid]=1;
return 1;
}
Re: [HELP]I want to know how to do register with permission -
Connor Smith - 15.06.2014
Thanks!
DONE