Help again.
#1

pawn Код:
if (strcmp("/tele", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 1790.5925,-1439.5399,13.4210);
        SendClientMessage(playerid, GREEN , "You have successfully teleported away.");
        SendMessageToAll(GREEN, "%s went to test.");
        return 1;
    }
It dosn't send the "SendMessageToAll" :S
Reply
#2

Use GetPlayerName + format + SendClientMessageToAll
Reply
#3

Does it set the position and send the first client message? and what was said above.
Reply
#4

Yes, it does iGetty.
Reply
#5

What is "SendMessageToAll"?

And depending on what 'SendMessageToAll' actually is, you may need to format a string and use it or add extra parameters to the end of SendMessageToAll.
Reply
#6

Quote:
Originally Posted by HighPitchedVoice
Посмотреть сообщение
Yes, it does iGetty.
yo need to format the string like so:
pawn Код:
if (strcmp("/tele", cmdtext, true, 10) == 0)
    {
        new str[128];
        format(str sizeof(str), "%s has went to test", GetName(playerid));
        SetPlayerPos(playerid, 1790.5925,-1439.5399,13.4210);
        SendClientMessage(playerid, GREEN , "You have successfully teleported away.");
        SendClientMessageToAll(GREEN, str);
        return 1;
    }
Reply
#7

try this:
pawn Код:
if (strcmp("/tele", cmdtext, true, 10) == 0)
    {
    new pName[MAX_PLAYER_NAME],str[100];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(str,sizeof(str)," %s went to test",pName);
    SetPlayerPos(playerid, 1790.5925,-1439.5399,13.4210);
    SendClientMessageToAll(-1,str);
    return 1;
    }
Reply
#8

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)