SA-MP Forums Archive
Announce Command. - 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: Announce Command. (/showthread.php?tid=515481)



Announce Command. - Clad - 26.05.2014

Thanks, Fixed.


Re: Announce Command. - Rittik - 26.05.2014

At the top add this.
Код:
new ActiveEvent[MAX_PLAYERS];
Under OnPlayerConnect
Код:
ActiveEvent[playerid] =0;
Under OnPlayerDisconnect
Код:
ActiveEvent[playerid] =0;
Код:
CMD:announceevent(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
new eventname[128],prize;
if(sscanf(params,"s[128]i",eventname,prize))
{
SendClientMessage(playerid,-1,"/announceevent [event name] [prize amount]");
return 1;
}
else
{
if(ActiveEvent[playerid] ==0)
{
ActiveEvent[playerid] =1;
SendClientMessageToAll(COLOR_GREEN, "* The Adminstrirator Has Started an Event - /getjobevent to join.");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   You need to start the event first (/startevent) !");
}
}
else
{
 SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
}
}
return 1;
}



Re: Announce Command. - Clad - 26.05.2014

I've done already that, I didn't just know how to make event name and prize, Thanks for help !! + Rep !


Re: Announce Command. - Rittik - 26.05.2014

Your welcome, BTW I didn't got any reputation points -.-