SA-MP Forums Archive
teleport command error - 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: teleport command error (/showthread.php?tid=315070)



teleport command error - BoyDenker - 01.02.2012

when i do compile it gaves me the error : TestServer.pwn(330) : error 035: argument type mismatch (argument 2)
But i can't find what i did wrong.

Code:
    if (strcmp("/islandairport", cmdtext, true, 14) == 0)
    {
	    SetPlayerPos(playerid, 3484.4885,-751.6512,4.4455);// @ teleport islandairport
	    SendClientMessage(COLOR_RED,"You have been teleported to islandairport");
            //deze command teleport je naar islandairport
	    return 1;
    }
    return 0;
}
Thanks


Re: teleport command error - aco_SRBIJA - 01.02.2012

pawn Code:
SendClientMessage(COLOR_RED,"You have been teleported to islandairport");
U made fail there. it should be like

pawn Code:
SendClientMessage(playerid,COLOR_RED,"You have been teleported to islandairport");
U forgot playerid.


Re: teleport command error - BoyDenker - 01.02.2012

Quote:
Originally Posted by aco_SRBIJA
View Post
pawn Code:
SendClientMessage(COLOR_RED,"You have been teleported to islandairport");
U made fail there. it should be like

pawn Code:
SendClientMessage(playerid,COLOR_RED,"You have been teleported to islandairport");
U forgot playerid.
Ty verry much i will test it

EDIT: it says SERVER:Unkown Command
help me out please

pawn code
Code:
    if (strcmp("/islandairport", cmdtext, true, 14) == 0)
    {
	SetPlayerPos(playerid, 3484.4885,-751.6512,4.4455);// @ teleport islandairport
	SendClientMessage(playerid,COLOR_RED,"You have been teleported to islandairport");
        //deze command teleport je naar islandairport
	return 1;
    }
    return 0;
}



Re: teleport command error - aco_SRBIJA - 01.02.2012

try copping this and putting in chat

Code:
/islandairport



Re: teleport command error - BoyDenker - 01.02.2012

Quote:
Originally Posted by aco_SRBIJA
View Post
try copping this and putting in chat

Code:
/islandairport
Still says : SERVER:Unkown Command


Re: teleport command error - BoyDenker - 01.02.2012

anyone??


Re: teleport command error - geerdinho8 - 01.02.2012

show us your whole OnPlayerCommandText


Re: teleport command error - -CaRRoT - 01.02.2012

Is that your ONLY Command ? or you have other CMD's ?


Re: teleport command error - BoyDenker - 01.02.2012

Quote:
Originally Posted by Breto
View Post
Is that your ONLY Command ? or you have other CMD's ?
this is my only command at the moment yes.

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/islandairport", cmdtext, true, 14) == 0)
    {
	SetPlayerPos(playerid, 3484.4885,-751.6512,4.4455);// @ teleport islandairport
	SendClientMessage(playerid,COLOR_RED,"You have been teleported to islandairport");
        //deze command teleport je naar islandairport
	return 1;
    }
    return 0;
}



Re: teleport command error - KingHual - 01.02.2012

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/islandairport", cmdtext, true, 14) == 0)
	{
 		SetPlayerPos(playerid, 3484.4885,-751.6512,4.4455);// @ teleport islandairport
   		SendClientMessage(playerid, COLOR_RED,"You have been teleported to islandairport");
   		return 1;
	}
	return 1;
}
If that doesn't work, make sure you're typing the command correctly in SA:MP.