samp-server.exe closes after I type 'gmx' in the cmd prompt
#3

I'm not sure what tolower is, but looked it up and saw it was something to deal with OnPlayerText, this is what's in it.

pawn Код:
new message[128];
    format(message, sizeof(message), "%s says: %s", GetName(playerid), text);
    SendLocalMessage(playerid, WHITE, message);
    return 0;
This is GetName(playerid)

pawn Код:
stock GetName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
And SendLocalMessage

pawn Код:
stock SendLocalMessage(playerid, color, string[])
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    foreach(Player, i)
    {
        if(IsPlayerConnected(i)) //&& GetPVarInt(i, "LoggedIn") == 1)
        {
            if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
            {
                if(IsPlayerInRangeOfPoint(i, 20, x, y, z))
                {
                    SendClientMessage(i, color, string);
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
samp-server.exe closes after I type 'gmx' in the cmd prompt - by Stephano - 27.05.2013, 23:46
Re: samp-server.exe closes after I type 'gmx' in the cmd prompt - by SuperViper - 28.05.2013, 01:16
Re: samp-server.exe closes after I type 'gmx' in the cmd prompt - by Stephano - 28.05.2013, 02:01

Forum Jump:


Users browsing this thread: 1 Guest(s)