SA-MP Forums Archive
How to disable Register/Login system in a script - 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: How to disable Register/Login system in a script (/showthread.php?tid=614006)



How to disable Register/Login system in a script - StrikerZ - 03.08.2016

How do i disable Login/Register system in a script?


Re: [+REP] How to disable Register/Login system in a script - Shinja - 03.08.2016

Make a variable and create a cmd to toggle it

PHP Code:
new toggle 1//enable by default 
PHP Code:
CMD:togglelr(playerid)
{
    if(
toggle == 1) return toggle 0;
    else return 
toggle 1;
    return 
1;




Re: How to disable Register/Login system in a script - StrikerZ - 03.08.2016

can i get the full cmd? im new to pawno :/ and i dont know about that script i downloaded it


Re: [+REP] How to disable Register/Login system in a script - Shinja - 03.08.2016

Quote:
Originally Posted by Shinja
View Post
Make a variable and create a cmd to toggle it

PHP Code:
new toggle 1//enable by default 
PHP Code:
CMD:togglelr(playerid)
{
    if(
toggle == 1) return toggle 0;
    else return 
toggle 1;
    return 
1;

I gave you full command, just add to your login/register system part
PHP Code:
if(toggle == 1)
{
    
//login register part
}
else 
//auto login or anything you want 



Re: How to disable Register/Login system in a script - StrikerZ - 03.08.2016

So can u help me with this error ?
Code:
C:\Users\suneildeeep singh\Desktop\SC-RP\gamemodes\SouthcarolinaRP.pwn(12291) : error 017: undefined symbol "IsAPt"
C:\Users\suneildeeep singh\Desktop\SC-RP\gamemodes\SouthcarolinaRP.pwn(12292) : error 017: undefined symbol "IsAPt"
C:\Users\suneildeeep singh\Desktop\SC-RP\gamemodes\SouthcarolinaRP.pwn(18465) : error 017: undefined symbol "IsAPt"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: How to disable Register/Login system in a script - Shinja - 03.08.2016

Show the lines


Re: How to disable Register/Login system in a script - StrikerZ - 03.08.2016

line 12291 and 12292
Code:
 
// LAPT
	if(IsAPt(playerid)) SendClientMessage(playerid, COLOR_YELLOW, "LA Public Transporation: {FFFFFF} /duty /r ");
	if(IsAPt(playerid) && PlayerInfo[playerid][pFacLeader]) SendClientMessage(playerid, COLOR_YELLOW, "LA Public Trans FACTION LEADER: {FFFFFF} /invite /uninvite /setrank /adjustrankname ");
	return 1;
}
line 18465 full code
Code:
CMD:r(playerid, params[])
{
	new string[128];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	//here is line line 18465// if(!IsACop(playerid) && !IsAGov(playerid) && !IsAHp(playerid) && !IsAFBI(playerid) && !IsALAFD(playerid) && !IsAHSF(playerid) && !IsASWAT(playerid) && !IsAPt(playerid) && !IsASATF(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LAPD Oficer/Government/FBI/LAFD/HSF Official.");
	if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/r)adio [text]");
	//if(AntiAdv(playerid, params)) return 1;
	if(PlayerInfo[playerid][pFacDiv]){format(string, sizeof(string), "** [%s] %s %s: %s", RPFDN(playerid), RPFRN(playerid), NORPN(playerid), params);}
	else {format(string, sizeof(string), "** %s %s: %s", RPFRN(playerid), NORPN(playerid), params);}
	SendPlayerFactionMessage(playerid, 0, COLOR_RADIO, string);
	if(IsACop(playerid)) Log("logs/SAPD.log", string);
	else if(IsAGov(playerid)) Log ("logs/GOV.log", string);
	else if(IsAFBI(playerid)) Log ("logs/FBI.log", string);
	else if(IsALAFD(playerid)) Log ("logs/LAFD.log", string);
	else if(IsAHSF(playerid)) Log ("logs/HSF.log", string);
	else if(IsASWAT(playerid)) Log ("logs/SWAT.log", string);
	else if(IsASATF(playerid)) Log ("logs/SATF.log", string);
	format(string, sizeof(string), "(IC RADIO) %s",params);
	SetPlayerChatBubble(playerid,string,COLOR_WHITE,15.0,5000);
	return 1;
}



Re: How to disable Register/Login system in a script - Shinja - 03.08.2016

It seems like you messed something as you didnt knew to implement my code, show me where you added my code


Re: How to disable Register/Login system in a script - StrikerZ - 03.08.2016

i didn't added till yet its the other errors it shows while compiling


Re: How to disable Register/Login system in a script - Shinja - 03.08.2016

How IsAPt declared? if it's a function show it