03.08.2016, 13:37
How do i disable Login/Register system in a script?
new toggle = 1//enable by default
CMD:togglelr(playerid)
{
if(toggle == 1) return toggle = 0;
else return toggle = 1;
return 1;
}
Make a variable and create a cmd to toggle it
PHP Code:
PHP Code:
|
if(toggle == 1)
{
//login register part
}
else //auto login or anything you want
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.
// 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; }
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; }