SA-MP Forums Archive
[help] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [help] (/showthread.php?tid=160558)



[help] - Guerek - 17.07.2010

I created a command to pull off adm
so that does not work
someone you see what's wrong?


Код:
	if (strcmp(cmd, "/removeadm", true)==0)
	{
		if (PlayerInfo[playerid][pAdmin] >= 1338)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USE: /removeadm [PlayerName]");
				return 1;
			}
			new string3[64];
			new playername3[MAX_PLAYER_NAME];
  			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
                        dini_IntSet(string3,"AdminLevel",0);
		}
		return 1;
	}



Re: [help] - Venturas - 17.07.2010

pawn Код:
if (strcmp(cmd, "/removeadm", true)==0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 1338)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USE: /removeadm [PlayerName]");
                return 1;
            }
            PlayerInfo[playerid][pAdmin] = 0;
        }
        return 1;
    }
Wow, you way out did yourself here. This is all you need. BTW this will remove YOUR admin not the [Playname]'s admin since you never defined him or tried to detect him in the command.


Re: [help] - Guerek - 17.07.2010

that what you post will get adm when they are online
I want to draw even with the guy outside the server


Re: [help] - Venturas - 17.07.2010

Umm well you shouldn't be starting off scripting with RPing modes.