Promote command.
#1

I want to create a promote command.
I was looking at a kick command and tried to create a promote command from it.
this is my code:
Код:
#include <a_samp>
#include <zcmd>

public OnPlayerCommandText(playerid, cmdtext[])
{
	CMD:giverights(playerid, pRights)
	{
		if(PlayerInfo[playerid][pRights] == 3)
		{
			new target;
			new rights[64];
			new str[128];
		 	new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
		 	GetPlayerName(playerid, Adminname, sizeof(Adminname));
		 	GetPlayerName(target, Playername, sizeof(Playername));
		 	if(sscanf(params, "us[64]", target,rights)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]");
		 	    if(!IsPlayerConnected(target))
                	return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
		PlayerInfo[target][pRights] = rights;
		}
	}
}
Error:
Код:
C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : error 029: invalid expression, assumed zero
C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : error 017: undefined symbol "cmd_giverights"
C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : error 029: invalid expression, assumed zero
C:\Users\Ruud\Documents\Samp\filterscripts\admin.pwn(6) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Promote command. - by xX4m4zingXx - 18.01.2015, 10:36
Re: Promote command. - by CalvinC - 18.01.2015, 10:45
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 11:31
Re: Promote command. - by CalvinC - 18.01.2015, 14:10
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 15:35
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 20:39
Re: Promote command. - by nezo2001 - 18.01.2015, 20:42
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 20:48
Re: Promote command. - by nezo2001 - 18.01.2015, 21:05
Re: Promote command. - by xX4m4zingXx - 23.01.2015, 18:03

Forum Jump:


Users browsing this thread: 1 Guest(s)