teleport command error
#1

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

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.
Reply
#3

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

try copping this and putting in chat

Code:
/islandairport
Reply
#5

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

Code:
/islandairport
Still says : SERVER:Unkown Command
Reply
#6

anyone??
Reply
#7

show us your whole OnPlayerCommandText
Reply
#8

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

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)