need help on teleport
#1

hi ive done my teleports but wen i type /lootrail it dont send message to all players sayin ive joind /looptrail how can i fix it

if(!strcmp(cmdtext, "/looptrail", true))
{
SetPlayerPos(playerid, 2080.822509, -2081.297607, 659.974304);
SetPlayerFacingAngle(playerid, 9.962593);
SendClientMessage(playerid, 0xFFFFD5FF, " Welcome to the loop trail! press 2 for nos!");
ResetPlayerWeapons(playerid);
return 1;
}
Reply
#2

The way you wrote it, it only sends a message to you.
If you want it to send a message to everyone:

Quote:

if(!strcmp(cmdtext, "/looptrail", true))
{
SetPlayerPos(playerid, 2080.822509, -2081.297607, 659.974304);
SetPlayerFacingAngle(playerid, 9.962593);
SendClientMessageToAll(0xFFFFD5FF, " Welcome to the loop trail! press 2 for nos!");
ResetPlayerWeapons(playerid);
return 1;
}

Reply
#3

But why should it send a message to all?..
Reply
#4

Quote:
Originally Posted by nickbugun
The way you wrote it, it only sends a message to you.
If you want it to send a message to everyone:

Quote:

if(!strcmp(cmdtext, "/looptrail", true))
{
SetPlayerPos(playerid, 2080.822509, -2081.297607, 659.974304);
SetPlayerFacingAngle(playerid, 9.962593);
SendClientMessageToAll(0xFFFFD5FF, " Welcome to the loop trail! press 2 for nos!");
ResetPlayerWeapons(playerid);
return 1;
}


thank you m8 il try it out later
Reply
#5

pawn Код:
if(!strcmp(cmdtext, "/looptrail", true))
{
    SetPlayerPos(playerid, 2080.822509, -2081.297607, 659.974304);
    SetPlayerFacingAngle(playerid, 9.962593);
    SendClientMessage(playerid, 0xFFFFD5FF, " Welcome to the loop trail! press 2 for nos!");
    new
        p[24],
        s[128];
    GetPlayerName(playerid, p, 24);
    format(s, 128, "%s has gone to the loop trail", p);
    SendClientMessageToAll(0xFFFFD5FF, str);
    ResetPlayerWeapons(playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)