makeadmin problem
#1

Buna ziua am si eu o problema m-am apucat sa invat script si sa editez un gm blown pe mysql dar marea mea problema este si anume comanda /makeadmin am scos si pe cea 1-3 si pe cea makeadminoff si am lasat un singur makeamdin gen o comanda la care sa am numai eu acces dar problema este ca, cateodata imi merge cateodata nu se poate o mana de ajutor? / Good day to all, i have a problem i just start to learn scripting on a blown gm on mysql and my big problem is the next one, i deleted from gm the makeadmin comand with 1-3 acces and the makeadminoff from gm , i puted my own to be secret and just me to use for security but sometimes is working sometimes is not working a help please?.
Код:
if(strcmp(cmd, "/test", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerData[playerid][pAdmin] >= 0)
			{
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "{ffffff}We are sorry , but you are not logged in to use this comand!");
	            return 1;
	        }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendUsage(playerid,"/test*dyavoloJustMe*");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			new PlayerName[MAX_PLAYER_NAME];
	        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	        if(EsteManager(playerid))
		    {
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
			            new day,month,year;
			            getdate(day,month,year);
			            new hour,minute,second;
			            gettime(hour,minute,second);
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "You have been promoted to admin level %d de catre %s.", level, sendername);
						SendClientMessage(para1, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "You promote %s at admin level %d.", giveplayer,level);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "%s promoted %s at admin level %d.", sendername, giveplayer,level);
						ABroadCast(COLOR_LIGHTBLUE, string, 1);
						format(string, sizeof(string), "%s promoted %s at admin level %d (%d-%d-%d), (%d:%d:%d)", sendername, giveplayer,level,day,month,year,hour,minute,second);
						HackLog(string);
						new query[128];
						PlayerData[para1][pAdmin] = level;
						format(query, sizeof(query), "UPDATE players SET AdminLevel='%d' WHERE id=%d", PlayerData[para1][pAdmin], PlayerData[para1][pSQLID]);
						mysql_query(query);
					}
				}
			}

		}
		}
		return 1;
	}
Reply
#2

sorry to say that . cannot understand your problem
Reply
#3

what part of it doesnt work? have you tried debugging?
Reply
#4

don't work really i dunno why some time give me admin some time dont show nothing and with dubuging how to do? what to do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)