SA-MP Forums Archive
script teleport what do i wrong - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: script teleport what do i wrong (/showthread.php?tid=248990)



script teleport what do i wrong - dekrumel - 16.04.2011

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/desert") == 0)
{
SetPlayerPos(playerid, 405.114,2441.080,16.312);
return 1;
}
return 0;



else {
if(strcmp(cmdtext, "/myteleport") == 1)
SetPlayerPos(playerid, -1967.8365, 2956.9823, 12.9375);
return 1;
}

return 0;
}





it say one error but i dont know what


Re: script teleport what do i wrong - CrazyBlob - 16.04.2011

you dont use the else function in that use this


Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/desert", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 405.114,2441.080,16.312);
		return 1;
	}
	if (strcmp("/myteleport", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, -1967.8365, 2956.9823, 12.9375);
		return 1;
	}
	return 0;
}
}



AW: script teleport what do i wrong - dekrumel - 16.04.2011

ok thx for your help


AW: script teleport what do i wrong - dekrumel - 16.04.2011

it doesnt go if i type /hafen i dont teleport ?