Basic teleporting.
#1

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gotolp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xaa3333a, "You have been teleported to LP!");
SetPlayerPos(playerid,-247.7184,2692.8208,62.6875);
return 1;
}
if (strcmp("/gotoarea", cmdtext, true, 10) == 0)
{
SendClientMessage,0xaa3333a, "You have been teleported to AREA 51.");
SetPlayerPos(playerid,207.0423,1906.9733,17.6406);
return 1;
}
return 0;

I get these errors;
Untitled.pwn(99) : error 076: syntax error in the expression, or invalid function call
Untitled.pwn(99) : error 029: invalid expression, assumed zero
Untitled.pwn(99) : warning 215: expression has no effect
Line 99 is this one " SendClientMessage,0xaa3333a, "You have been teleported to AREA 51."); "
Reply
#2

Well, you forget a bracket and playerid parameter on your sendclientmessage function from your second command -
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/gotolp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xaa3333a, "You have been teleported to LP!");
        SetPlayerPos(playerid,-247.7184,2692.8208,62.6875);
        return 1;
    }
    if (strcmp("/gotoarea", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xaa3333a, "You have been teleported to AREA 51.");
        SetPlayerPos(playerid,207.0423,1906.9733,17.6406);
        return 1;
    }
    return 0;
}
Reply
#3

dont mean

and next time use the pawn tags
Reply
#4

Oh dear God, am I retarded? Haha, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)