delite topic
#1

admins delite thiz topic
Reply
#2

Use a timer.
Reply
#3

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;
}
Reply
#4

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!~!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)