SA-MP Forums Archive
whats wrong with this? - 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: whats wrong with this? (/showthread.php?tid=168248)



whats wrong with this? - billiout - 15.08.2010

Код:
        if(IsPlayerAdmin(playerid))
 		{
			new cmds[128];
			new giveplayerid;
			new tmp[256];
			giveplayerid = strval(tmp);
		 	if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,COLOR_SYSTEM,"Invalid id");
			if(IsPlayerNPC(giveplayerid)) return SendClientMessage(playerid,COLOR_SYSTEM,"Not on npc");
 			new oname[24];
    		new pname[24];
    		GetPlayerName(playerid,oname, 24);
			GetPlayerName(giveplayerid, pname, 24);
			format(cmds,sizeof cmds,"Player %s has been kicked by Rcon Administrator %s",pname,oname);
   			SystemMessageToAll(cmds);
     		format(cmds,sizeof cmds,"kick %s",inputtext);
   			SendRconCommand(cmds);
   		}
its not cmd. its dialog response but it doent show the pname(giveplayerid) right. whats wrong?


Re: whats wrong with this? - armyoftwo - 15.08.2010

typo
Код:
    		new pname[24];
    		GetPlayerName(playerid,pname, 24);
EDIT: nvm didn't see that.. -.-


Re: whats wrong with this? - billiout - 15.08.2010

my problem is that the code think im npc. i have loaded an npc really but the id its not npc.and if i type and invalid id still says not on npc.


Re: whats wrong with this? - billiout - 15.08.2010

sry for bump but the problem still not solved and i put and another problem. i have this

Код:
			if(inputtext <= 40 && inputtext >= 0)
			{
                        }
and i have this error "error 033: array must be indexed (variable "inputtext")"

how to solve it? ah and its also on input style dialog box