Begginner problem with SendClientMessage
#5

First of all, the language is PAWN, the "pawno" is the compiler.

Also, the lenght is optional and it is not needed to use it. For example in the "/location" the lenght is 9, not 10.
You can read a lot of stuff on the Wiki Samp and read about Format and Floats
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/location", true))
    {
        new
            Float:Pos[3],
            string[41]
        ;
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        format(string, sizeof(string), "X: %.4f, Y: %.4f, Z: %.4f", Pos[0], Pos[1], Pos[2]);
        SendClientMessage(playerid, COLOR_RED, string);
        return 1;
    }
    // Rest of commands
    return 0;

}
Reply


Messages In This Thread
Begginner problem with SendClientMessage - by Sam5513 - 09.11.2012, 10:35
Re: Begginner problem with SendClientMessage - by mSlat3r - 09.11.2012, 10:36
Re: Begginner problem with SendClientMessage - by doreto - 09.11.2012, 10:38
Re: Begginner problem with SendClientMessage - by Sam5513 - 09.11.2012, 10:43
Re: Begginner problem with SendClientMessage - by Konstantinos - 09.11.2012, 10:46

Forum Jump:


Users browsing this thread: 3 Guest(s)