SA-MP Forums Archive
How to Convert strcmp to 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: How to Convert strcmp to zcmd (/showthread.php?tid=431979)



How to Convert strcmp to zcmd - Azwar - 20.04.2013

How to Convert strcmp to ZMD I Getting Error..
example Want to Conert '
Код:
if(strcmp(cmd, "/skydive", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				GetPlayerPos(playerid, rx, ry, rz);
				if(IsPlayerConnected(playerid))
				{
					GivePlayerGun(playerid, 46);
					SetPlayerPos(playerid,rx, ry, rz+1500);
					SendClientMessage(playerid, COLOR_WHITE, "GO!! GO!! GO!!");
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
			}
		}
		return 1;
Kan You Help me?


Re: How to Convert strcmp to zcmd - gtakillerIV - 20.04.2013

Код:
if(strcmp(cmd, "/skydive", true) == 0)
To:

Код:
CMD: skydive(playerid, params[])



Re: How to Convert strcmp to zcmd - Azwar - 20.04.2013

I got this Error If I Not Convert to Zcmd
[IMG][/IMG]
But If I Convert to
CMD: skydive(playerid, params[])
I got this



AW: How to Convert strcmp to zcmd - HurtLocker - 20.04.2013

Do you define somewhere those position coordinates Floats?


Re: How to Convert strcmp to zcmd - Azwar - 20.04.2013

Can you Give me Tutorial Define
Because Iam Newbie In Scripting


AW: How to Convert strcmp to zcmd - HurtLocker - 20.04.2013

when I say define I mean this:
pawn Код:
new Float:rx, Float:ry, Float:rz;