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
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
Re: teleport command error -
BoyDenker - 01.02.2012
Quote:
Originally Posted by aco_SRBIJA
try copping this and putting in chat
|
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
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.