script teleport what do i wrong
#1

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
Reply
#2

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;
}
}
Reply
#3

ok thx for your help
Reply
#4

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


Forum Jump:


Users browsing this thread: 2 Guest(s)