Text Message Script[Help]
#1

Hai everyone...

i need help in something. i am starting a Trucking Server..

its almost finished...

in that i was wondering how to do this following stuff

gm is a PPc and i edited few things and added few stuffs made few improvements
with few helps from others

The thing i wanted to know is

is it possible

there is a /convoy system in trucking. i thought i would be better if it has an option as in Announce.
in /convoy menu. this Announce fuction should send a msg to all the truckers in server
if a trucker starts convoy and if he selects this announce
a msg should be displayed

like this for ex:

XXX player has started Convoy in xxx trailer in xxx location

this is one thing

the second thing is

if a convoy is finished i tought if a text appears to all saying

XXX player convoy has hauled xxx from xxx to xxx in xxxx min/sec

is it possible ?

can someone help me out ?
Reply
#2

When Player Start's Convoy
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/convoy", cmdtext, true, 10) == 0)
    {
        //All your stuff here.
        //Now Add
        new pName[MAX_PLAYERS_NAME],msg[100];
        GetPlayerName(playerid,pName,20);
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z);
        format(msg,sizeof(msg),"%s player started Convoy in %d trailer in (%f,%f) location.",pName,trailer_number_here,X,Y);
        SendClientMessageToAll(YOUR_COLOR_HERE,msg);
        return 1;
    }
    return 0;
}
Do similarly when convoy ends
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)