24.03.2012, 16:13
Hello,
I'm kinda newbie with scripts
I made a teleport command with sendclientmessagetoall
The command is /hq when i type this command it teleports me to the place i want with the clientmessage
But when i type any other command like example /help, The client message which i made for the teleport shows up
But it doesn't teleport me, even if i type a random command like /143jvkfnk the message will show up X:
What i exactly mean, Check the pictures
Here i typed /hq and teleported also the message showed up

Here i typed /help which should not show the same message but it does

After typing /help

See the message saying i teleported to the HQ
This happens with every command i type
Can someone say what's wrong here?
I'm kinda newbie with scripts
I made a teleport command with sendclientmessagetoall
The command is /hq when i type this command it teleports me to the place i want with the clientmessage
But when i type any other command like example /help, The client message which i made for the teleport shows up
But it doesn't teleport me, even if i type a random command like /143jvkfnk the message will show up X:
What i exactly mean, Check the pictures
Here i typed /hq and teleported also the message showed up

Here i typed /help which should not show the same message but it does


After typing /help

See the message saying i teleported to the HQ
This happens with every command i type
Can someone say what's wrong here?
Код:
#include <a_samp>
#define COLOR_RED 0xFF0000AA
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hq", cmdtext, true, 10) == 0)
SetPlayerPos(playerid, 213.9292, 1902.094, 17.64063);
new string[50];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,18);
format(string, sizeof(string), "%s has teleported to Blood Line HQ",name);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}

