Text Message Script[Help] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Text Message Script[Help] (
/showthread.php?tid=355721)
Text Message Script[Help] -
ashben10 - 01.07.2012
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 ?
Re: Text Message Script[Help] -
[MM]RoXoR[FS] - 01.07.2012
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