How to disable Register/Login system in a script
#1

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

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;

Reply
#3

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

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 
Reply
#5

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.
Reply
#6

Show the lines
Reply
#7

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;
}
Reply
#8

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)