Text only in vehicle?
#6

Use the search button next time, Jesus. I posted this literally 30 minutes ago.

Source:
http://forum.sa-mp.com/showthread.ph...58#post2923858

Quote:
Originally Posted by Mionee
https://sampforum.blast.hk/showthread.php?tid=79709

Something like this (using zcmd and sscanf):

pawn Код:
CMD:carmsg(playerid, params[])
{
    new string[128], text[100];
       
    if(sscanf(params, "s[100]", text)) return SendClientMessage(playerid, -1, "USAGE: /carmsg [text]");

    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)))
            {
                format(string, sizeof(string), "[%s]: %s", GetPlayerName(playerid, string, sizeof(string)), text);
                SendClientMessage(i, -1, string);
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Text only in vehicle? - by Lajko1 - 20.02.2014, 21:48
Re: Text only in vehicle? - by Flake. - 21.02.2014, 00:50
Re: Text only in vehicle? - by Aerotactics - 21.02.2014, 06:18
Re: Text only in vehicle? - by Lajko1 - 21.02.2014, 17:15
Re: Text only in vehicle? - by Lajko1 - 21.02.2014, 21:34
Re: Text only in vehicle? - by Dignity - 21.02.2014, 21:50
Re: Text only in vehicle? - by Scenario - 21.02.2014, 22:20
Re: Text only in vehicle? - by Threshold - 21.02.2014, 23:49
Re: Text only in vehicle? - by Lajko1 - 27.02.2014, 14:25
Re: Text only in vehicle? - by Threshold - 27.02.2014, 22:04

Forum Jump:


Users browsing this thread: 3 Guest(s)