SA-MP Forums Archive
Error with ZCmd - 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)
+--- Thread: Error with ZCmd (/showthread.php?tid=451979)



Error with ZCmd - Vinex - 19.07.2013

Heyhu,
I've got a problem.

When I use zcmd the command /aw works fine...
Код:
command(aw,playerid,params[]) {
	new pID,Nach[128];
	if(!LoggedIn(playerid)) return SendClientMessage(playerid,COL_ERROR,Notlogged);
	if(!PlayerAdmin(playerid,1)) return SendClientMessage(playerid,COL_ERROR,Adminerror);
	if(sscanf(params,"us[128]",pID,Nach)) return SendClientMessage(playerid,COL_ERROR,"Benutze: /aw [PlayerID/Name] [Nachricht]");
	if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COL_ERROR,"Dieser Spieler ist nicht online");
	format(string1,sizeof(string1),"%s %s flьstert Dir: %s",GetAdminRank(playerid),GetName(playerid),Nach);
	SendClientMessage(pID,COL_GELB,string1);
	format(string1,sizeof(string1),"Du hast %s eine Nachricht geschickt!",GetName(pID));
	SendClientMessage(playerid,COL_WEISS,string1);
	return 1; }
But for example the command /port returns "Unknown command"

Код:
command(port,playerid,params[]) {
	new Float:x,Float:y,Float:z,pID;
	if(!LoggedIn(playerid)) return SendClientMessage(playerid,COL_ERROR,Notlogged);
	if(!PlayerAdmin(playerid,1)) return SendClientMessage(playerid,COL_ERROR,Adminerror);
	if(sscanf(params,"u",pID)) return SendClientMessage(playerid,COL_ERROR,"Benutze: /port [PlayerID/Name]");
	if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COL_ERROR,"Dieser Spieler ist nicht online");
	GetPlayerPos(pID,x,y,z);
	SetPlayerPos(playerid,x+1,y,z);
	format(string1,sizeof(string1),"[ADMIN] %s hat sich zu %s geportet",GetName(playerid),GetName(pID));
	AdminBro(1,string1);
	return 1; 
}
I hope you can help me ..

//Edit: The command /port works, but it returns the error message ...


Re: Error with ZCmd - Misiur - 19.07.2013

Which error message?


AW: Error with ZCmd - Vinex - 19.07.2013

Quote:

But for example the command /port returns "Unknown command"

This error message ...

//Edit:
Got it. I've forgotten the IsPlayerConnected statement