I Can't Make a Teleport
#1

Okay... Tell me stupid or fool

But please tell me what i am wrong

The .pwn is compiling but when i type /spawn do not teleport me

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/spawn", cmdtext, true) == 0)
{
  SetPlayerPos(playerid, 2186.6880,1113.7452,12.6484);
	return 1;
}
	return 0;
}
P.S Sory for my bad english
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/spawn", cmdtext, true, 6) == 0)
    {
        SetPlayerPos(playerid, 2186.6880,1113.7452,12.6484);
        return 1;
    }
    return 0;
}
Should work fine.
Reply
#3

Should work, what's happening when you do that?
You don't put that whole code somewhere in the script, do you?
Reply
#4

Quote:
Originally Posted by mavtias
Should work, what's happening when you do that?
You don't put that whole code somewhere in the script, do you?
He's missing a little ,CMDLENGTH at the end, although, I don't think that would cause it not to work, I don't know.
Reply
#5

i agree with mavtis
Reply
#6

Quote:
Originally Posted by zinoman10
i agree with mavtis
There's nothing to agree with...
Reply
#7

Nope Not working
Quote:
Originally Posted by sizeof(Sky));
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/spawn", cmdtext, true, 6) == 0)
    {
        SetPlayerPos(playerid, 2186.6880,1113.7452,12.6484);
        return 1;
    }
    return 0;
}
Should work fine.
Reply
#8

pawn Код:
if(strcmp(cmdtext, "/something", true) == 0)
    {
    // some action
    return 1;
    }
Try this. Copied from some of my scripts...

Sorry for my bad english.
Reply
#9

Nope Not working
Quote:
Originally Posted by AG Adam
pawn Код:
if(strcmp(cmdtext, "/something", true) == 0)
    {
    // some action
    return 1;
    }
Try this. Copied from some of my scripts...

Sorry for my bad english.
Reply
#10

Quote:
Originally Posted by anonimu45
Nope Not working
Quote:
Originally Posted by AG Adam
pawn Код:
if(strcmp(cmdtext, "/something", true) == 0)
    {
    // some action
    return 1;
    }
Try this. Copied from some of my scripts...

Sorry for my bad english.
You are a bad boy this works for me. Learn pawn before you script, man.
And try this. If it don't works you are do something bad.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/jбrművek", true)==0)
    {
    SendClientMessage(playerid, 0x0000BBAA,"Jбrművek");
    SendClientMessage(playerid, 0x46BBAA00,"/jбrművek1 - 1. jбrmű vбlogatбs");
    SendClientMessage(playerid, 0x46BBAA00,"/jбrművek2 - 2. jбrmű vбlogatбs");
    SendClientMessage(playerid, 0x46BBAA00,"/jбrművek3 - 3. jбrmű vбlogatбs");
    return 1;
    }
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)