SA-MP Forums Archive
Help me please with dcmd command - 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 me please with dcmd command (/showthread.php?tid=132987)



Help me please with dcmd command - Nexotronix - 10.03.2010

Код:
new giveplayerid;
new jailed[MAX_PLAYERS];


public OnPlayerCommandText(playerid, cmdtext[])
{
	dcmd(escape,6, cmdtext);
	return 0;
}
dcmd_escape(playerid)
{
	playerid = giveplayerid;
	if(jailed[playerid] = 1)
	{
  new escape = random(5);
	if(escape == 1)
		{
		SetPlayerPos(playerid,-1646.3103,719.1433,26.4609);
		GameTextForPlayer(playerid,"ESCAPED!",3000,1);
		SendClientMessage(playerid, COLOR_RED,"You escaped from jail!");
		}
	}
	return 1;
}
i have warnings:

Код:
C:\Users\Nexotronix\Desktop\Новая папка\samp03asvr_R4_win32\filterscripts\dcmdar.pwn(11) : warning 202: number of arguments does not match definition
C:\Users\Nexotronix\Desktop\Новая папка\samp03asvr_R4_win32\filterscripts\dcmdar.pwn(11) : warning 202: number of arguments does not match definition
C:\Users\Nexotronix\Desktop\Новая папка\samp03asvr_R4_win32\filterscripts\dcmdar.pwn(17) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
please help me if you can!


Re: Help me please with dcmd command - Desert - 10.03.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(escape,6, cmdtext);
    return 0;
}
dcmd_escape(playerid,params[])
{
       #pragma unused params
    playerid = giveplayerid;
    if(jailed[playerid] == 1)
    {
  new escape = random(5);
    if(escape == 1)
        {
        SetPlayerPos(playerid,-1646.3103,719.1433,26.4609);
        GameTextForPlayer(playerid,"ESCAPED!",3000,1);
        SendClientMessage(playerid, COLOR_RED,"You escaped from jail!");
        }
    }
    return 1;
}
Try this


Re: Help me please with dcmd command - Nexotronix - 10.03.2010

Thank you, no warning, only wuz 217