delite topic - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: delite topic (
/showthread.php?tid=136336)
delite topic -
m0k1 - 24.03.2010
admins delite thiz topic
Re: /news after 20 secondes -
[LSR]State_Trooper - 25.03.2010
Use a timer.
Re: /news after 20 secondes -
MaykoX - 25.03.2010
pawn Код:
//Ontop
new news;
new newstimer;
//onplayerconnect
news[playerid] = 1;
//underonplayercommand
if(strcmp,cmdtext, "/news",...)
{
news[playerid] = 0
SetTimer("newstimer",20000,1);
//other stuff
return 1;
}
public newstimer(playerid)
{
news[playerid] = 1;
// you can add other stuff here like SendClientMessage etc.
return 1;
}
Re: /news after 20 secondes -
[LSR]State_Trooper - 25.03.2010
Quote:
Originally Posted by † мąүқоҳ™
pawn Код:
//Ontop new news; new newstimer; //onplayerconnect news[playerid] = 1; //underonplayercommand if(strcmp,cmdtext, "/news",...) { news[playerid] = 0 SetTimer("newstimer",20000,1); //other stuff return 1; }
public newstimer(playerid) { news[playerid] = 1; // you can add other stuff here like SendClientMessage etc. return 1; }
|
Great example, Well done!~!