Jump to content
  • 0

Ajutor la SystAdmin


[RSD]TheBoss

Question

Am incercat sa fak un fs cu admin si....

C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(19) : error 017: undefined symbol "PLAYER_MAIN"
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(19) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(44) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(48) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(60) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(61) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(62) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(63) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(64) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(65) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(66) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(67) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(68) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(69) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(69) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(70) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(75) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(75) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(76) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(76) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(77) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(78) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(79) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(80) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(81) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(82) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(83) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(84) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(85) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(86) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(87) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(88) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(89) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(90) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(91) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(104) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(117) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(118) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(119) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(119) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(120) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(120) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(127) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(129) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(136) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(138) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(139) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(139) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(140) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(149) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(151) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(155) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(161) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(163) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(170) : error 047: array sizes do not match, or destination array is too small
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(173) : error 047: array sizes do not match, or destination array is too small
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(176) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(177) : warning 217: loose indentation
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(177) : warning 213: tag mismatch
C:\Users\Robert\Desktop\Server of Samp\Call of duty Solid War\filterscripts\SystAdmins.pwn(186) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Ambele erori vin de la linia asta
new gPlayerInfo[MAX_PLAYERS][PLAYER_MAIN];
daka vreti va dau si fs-ul.... o sa-l pun aici intre
#include <a_samp>
#include <dini>
#include <dudb>
#include <dutils>


#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOUR_GREEN           0x33AA33AA
#define COLOUR_RED             0xAA3333AA
#define COLOUR_YELLOW          0xFFFF00AA
#define COLOUR_LIGHTBLUE       0x33CCFFAA
#define COLOUR_ORANGE          0xFF9900AA

#define PlayerFile 	       "SystAdmin/Users/%s.ini"
#define SettingFile            "SystAdmin/Settings/MainSettings.ini"
#define CommandFile            "SystAdmin/Settings/Commands.ini"
new gPlayerInfo[MAX_PLAYERS][PLAYER_MAIN];

enum PLAYER_MAIN {
	PLAYER_NAME[MAX_PLAYER_NAME],
	PLAYER_IP[16],
	PLAYER_REGGED,
	PLAYER_PASS,
	PLAYER_LOGGED,
	PLAYER_LEVEL,
	PLAYER_WIRED,
	PLAYER_JAILED
}


public OnFilterScriptInit()
    {
    
 	return 1;
    }

    #endif
    
public OnPlayerConnect(playerid)
{
 	new file[100],Name[MAX_PLAYER_NAME],Ip[16];
        GetPlayerName(playerid,Name,sizeof(Name));
        GetPlayerIp(playerid,Ip,sizeof(Ip));
        format(file,sizeof(file),PlayerFile,Name);

	if(!dini_Exists(file))
        {
	     dini_Create(file);
	     dini_Set(file,"Name",Name);
	     dini_Set(file,"Ip",Ip);
	     dini_IntSet(file,"Registered",-1);
	     dini_IntSet(file,"Password",0);
	     dini_IntSet(file,"Level",0);
	     dini_IntSet(file,"Wired",0);
	     dini_IntSet(file,"Jailed",0);
	     SendClientMessage(playerid,COLOUR_ORANGE,"You are not register please use /register.");
	}
	strcat(gPlayerInfo[playerid][PLAYER_NAME],			dini_Get(file,"Name"));
	strcat(gPlayerInfo[playerid][PLAYER_IP],			dini_Get(file,"Ip"));
	gPlayerInfo[playerid][PLAYER_REGGED] 			      = dini_Int(file,"Registered");
	gPlayerInfo[playerid][PLAYER_PASS]                            = dini_Int(file,"Password");
	gPlayerInfo[playerid][PLAYER_LEVEL] 			      = dini_Int(file,"Level");
	gPlayerInfo[playerid][PLAYER_WIRED]                           = dini_Int(file,"Wired");
	gPlayerInfo[playerid][PLAYER_JAILED] 			      = dini_Int(file,"Jailed");
	if(gPlayerInfo[playerid][PLAYER_REGGED] == 0) 	                SendClientMessage(playerid,COLOUR_ORANGE,"You are not register please use /register.");
	else if(gPlayerInfo[playerid][PLAYER_REGGED] == 1)              SendClientMessage(playerid,COLOUR_ORANGE,"Now YOu are register please use /login.");
        gPlayerInfo[playerid][PLAYER_REGGED]                          = 0;
	return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
	new file[100];
        format(file,sizeof(file),PlayerFile,gPlayerInfo[playerid][PLAYER_NAME]);
	dini_Set(file,"Name",gPlayerInfo[playerid][PLAYER_NAME]);
	dini_Set(file,"Ip",gPlayerInfo[playerid][PLAYER_IP]);
	dini_IntSet(file,"Registered",gPlayerInfo[playerid][PLAYER_REGGED]);
	dini_IntSet(file,"Password",gPlayerInfo[playerid][PLAYER_PASS]);
	dini_IntSet(file,"Level",gPlayerInfo[playerid][PLAYER_LEVEL]);
	dini_IntSet(file,"Wired",gPlayerInfo[playerid][PLAYER_WIRED]);
	dini_IntSet(file,"Jailed",gPlayerInfo[playerid][PLAYER_JAILED]);
	gPlayerInfo[playerid][PLAYER_NAME]   = 0;
	gPlayerInfo[playerid][PLAYER_IP]     = 0;
	gPlayerInfo[playerid][PLAYER_REGGED] = 0;
	gPlayerInfo[playerid][PLAYER_LOGGED] = 0;
	gPlayerInfo[playerid][PLAYER_PASS]   = 0;
	gPlayerInfo[playerid][PLAYER_LEVEL]  = 0;
	gPlayerInfo[playerid][PLAYER_WIRED]  = 0;
	gPlayerInfo[playerid][PLAYER_JAILED] = 0;
    	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(register, 8, cmdtext);
    dcmd(login, 5, cmdtext);
    dcmd(logout, 6, cmdtext);
    dcmd(password, 8, cmdtext);

    return 0;
}
dcmd_register(playerid, params[])
{
    if(gPlayerInfo[playerid][PLAYER_REGGED] == 1)
	return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You have already registered!");
    else if(!params[0])
	return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /register [password]");
    /*else if(strlen(params) < gSettings[PASS_MIN] || strlen(params) > gSettings[PASS_MAX])
    {
	new string[128];
        format(string, sizeof(string), "ERROR: Password must be between %d and %d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
	return SendClientMessage(playerid, COLOUR_ORANGE, string);
    }*/
    else
    {
	new password = num_hash(params);
	gPlayerInfo[playerid][PLAYER_PASS] = password;
	gPlayerInfo[playerid][PLAYER_REGGED] = 1;
        gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
	GetPlayerIp(playerid, gPlayerInfo[playerid][PLAYER_IP], 16);
	new string[128]; format(string, sizeof(string), "You have successfully registered your account with the password \'%s\'. You have been automatically logged in.", params);
	return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
    }
}
dcmd_login(playerid, params[])
{
    if(gPlayerInfo[playerid][PLAYER_REGGED] != 1)
	return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You must register first to do that! Use /register [password] to register and login.");
    else if(gPlayerInfo[playerid][PLAYER_LOGGED] == 1)
	return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You are already logged-in.");
    else if(!params[0])
	return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /login [password]");
    else
    {
	new password = num_hash(params);
	if(gPlayerInfo[playerid][PLAYER_PASS] == password)
	{
	    gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
            GetPlayerIp(playerid, gPlayerInfo[playerid][PLAYER_IP], 16);
	    return SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have successfully logged in to your account.");
	}
	else
	    return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: Incorrect password.");
    }
}
dcmd_logout(playerid, params[])
{
#pragma unused params
    if(gPlayerInfo[playerid][PLAYER_REGGED] != 1)
	return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You must register first to do that! Use /register [password] to register.");
    else if(gPlayerInfo[playerid][PLAYER_LOGGED] == 0)
	return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You are already logged-out.");
    else
    {
	gPlayerInfo[playerid][PLAYER_LOGGED] = 0;
	return SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You have successfully logged out of your account.");
    }
}
dcmd_password(playerid, params[])
{
    if(gPlayerInfo[playerid][PLAYER_REGGED] != 1)
        return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You must register first to do that! Use /register [password] to register and login.");
    else if(gPlayerInfo[playerid][PLAYER_LOGGED] == 0)
	return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You must be logged-in to do that! Use /login [password] to login.");
    else
    {
	new tmp[30],
	    tmp2[30],
	    index;
	tmp = strtok(params, index);
	if(!strlen(tmp))
            return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /password [password] [new password]");
	tmp2 = strtok(params, index);
	if(!strlen(tmp2))
	    return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /password [password] [new password]");
        new oldpassword = num_hash(tmp), newpassword = num_hash(tmp2);
	if(gPlayerInfo[playerid][PLAYER_PASS] == oldpassword)
	{
	    if(oldpassword == newpassword)
	        return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: Your old password can not be the same as your new password.");
            /*else if(strlen(tmp2) < gSettings[PASS_MIN] || strlen(tmp2) > gSettings[PASS_MAX])
            {
                new string[100]; format(string, sizeof(string), "ERROR: Your new password must be between %d and %d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
                return SendClientMessage(playerid, COLOUR_ORANGE, string);
            }*/
	    gPlayerInfo[playerid][PLAYER_PASS] = newpassword;
	    new string[128]; format(string, sizeof(string), "You have successfully changed your password from \'%s\' to \'%s\'.", tmp, tmp2);
	    return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
	}
	else
	    return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: Incorrect password.");
    }
}

App:

nU INTELEG Dc nu vrea..

New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Guest RockStar

Lucian mai bine nu postai si TheBoss pune

enum PLAYER_MAIN {
	PLAYER_NAME[MAX_PLAYER_NAME],
	PLAYER_IP[16],
	PLAYER_REGGED,
	PLAYER_PASS,
	PLAYER_LOGGED,
	PLAYER_LEVEL,
	PLAYER_WIRED,
	PLAYER_JAILED
}
Deasupra la
new gPlayerInfo[MAX_PLAYERS][PLAYER_MAIN];
Si o sa iti dea decat 2 erori , acum incerc sa le rezolv si pe celelalte Edit : Am incercat sa rezolv celelalte erori dar nu stiu ... Edit 2 : Am gasit si celelalte 2 erori la
new tmp[30],
 tmp2[30],
Schimba 30 cu 128
new tmp[128],
tmp2[128],

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.