Code:
C:\Users\Toni\Desktop\Millenium\gamemodes\moje.pwn(122) : error 017: undefined symbol "UserPath"
C:\Users\Toni\Desktop\Millenium\gamemodes\moje.pwn(124) : error 017: undefined symbol "UserPath"
C:\Users\Toni\Desktop\Millenium\gamemodes\moje.pwn(136) : error 017: undefined symbol "UserPath"
C:\Users\Toni\Desktop\Millenium\gamemodes\moje.pwn(183) : error 029: invalid expression, assumed zero
C:\Users\Toni\Desktop\Millenium\gamemodes\moje.pwn(183) : error 017: undefined symbol "cmd_makeleader"
C:\Users\Toni\Desktop\Millenium\gamemodes\moje.pwn(183) : error 029: invalid expression, assumed zero
C:\Users\Toni\Desktop\Millenium\gamemodes\moje.pwn(183) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.
Code:
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
}
return 1;
}
Code:
CMD:makeleader(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4) //Replace this with your player variable
{
new targetid, facid;//establishes a player and a faction id, to be typed in
if(sscanf(params,"ui",targetid, facid)) return SendClientMessage(playerid, COL_RED,"/makeleader [id][Faction id]");//if the command is misused it will tell them the correct way to use it
if(targetid != INVALID_PLAYER_ID)//checks if the id you type in is an id that is not connected to the server
{
PlayerInfo[targetid][pFaction] = facid; //sets the players faction to the faction you choose
PlayerInfo[targetid][pFacrank] = 10;//sets their rank to the highest rank
PlayerInfo[targetid][pFacleader] = facid;//sets their leadership to the id of the faction
if(facid == 1)//checks if the factionid typed was 1, and tells them they are the leader of the police below
{
SendClientMessage(targetid,COL_RED,"You have been made the leader of the police department");
}
}
}
else //if the player is not an admin it will show the below message telling them they are not an admin.
{
SendClientMessage(playerid, COL_RED, "Only certan levels of Administration have access to this command.");
}
return 1;
}