Fix /go command
#1

If I do /go to a player the string send to me not for the player I have teleported.

Fixed...

pawn Код:
else SetPlayerPos(playerid, x + 1, y + 1, z);
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(str, sizeof(str), "{FFFF00}(/go) %s (%d) has teleported to you", name, playerid);
    SendClientMessage(playerid, 0xFFFFFFFF, str);
    return 1
I just follow newbienoob said..
Reply
#2

GetPlayerName(ID, name, MAX_PLAYER_NAME);
Reply
#3

You're sending the message to the playerid, take a look at sendclientmessage.
Reply
#4

Didn't realize that...
SendClientMessage(ID, 0xFFFFFFFF, str);
Reply
#5

Quote:
Originally Posted by leonardo1434
Посмотреть сообщение
You're sending the message to the playerid, take a look at sendclientmessage.
Well you mean do I need to change it to SendClientMessage(playerid, 0xFFFFFFFF, str);

to SendClientMessage(ID, 0xFFFFFFFF, str);

And i will just remain GetPlayerName(playerid, name, MAX_PLAYER_NAME);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)