GMX problem! - 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: GMX problem! (
/showthread.php?tid=417736)
GMX problem! -
karni357 - 22.02.2013
How do I do after the count will be the command GMX?
PHP код:
if(strcmp("/GMX",cmdtext,true) == 0)
{
if(!IsPlayerAdmin(playerid) && Ad[playerid][Level] < 20) return SendClientMessage(playerid,0xff0000ff,"тм оръ мбцт фчегд же тмйк мдйеъ агойп бшод 20");
gmx_time = 60;
StartCD = SetTimer("CountDown",1000,1);
new string[1];
format(string,sizeof(string),"тщд айфес мщшъ %s ордм дщшъ",GetName(playerid));
SendClientMessageToAll(0xff9900ff,string);
SendRconCommand("gmx");
return 1;
}
Tnx alot for who's help!
Re: GMX problem! - Patrick - 22.02.2013
karni you could like this
pawn Код:
//commands
if(strcmp("/gmx",cmdtext,true) == 0)
{
if(!IsPlayerAdmin(playerid) && Ad[playerid][Level] < 20) return SendClientMessage(playerid,0xff0000ff,"тм оръ мбцт фчегд же тмйк мдйеъ агойп бшод 20");
StartCD = SetTimer("startgmx",10000,0); //countdown 10 seconds
new string[1];
format(string,sizeof(string),"тщд айфес мщшъ %s ордм дщшъ",GetName(playerid));
SendClientMessageToAll(0xff9900ff,string);
return 1;
}
//call back
forward startgmx();
public startgmx()
{
SendRconCommand("gmx");
return 1;
}
Re: GMX problem! -
karni357 - 22.02.2013
Tnx Alot i add more timer to the commands and open the public you give me,
so have Time write in the server CD time and after the time have GMX
PHP код:
if(strcmp("/GMX",cmdtext,true) == 0)
{
if(!IsPlayerAdmin(playerid) && Ad[playerid][Level] < 20) return SendClientMessage(playerid,0xff0000ff,"тм оръ мбцт фчегд же тмйк мдйеъ агойп бшод 20");
new string[128];
format(string,sizeof(string),"дзм сфйшд мазеш мфрй айфес дщшъ %s ордм дщшъ",GetName(playerid));
SendClientMessageToAll(0xff9900ff,string);
gmx_time = 60;
StartCD = SetTimer("CountDown",1000,1);
SetTimer("StartGMX",gmx_time*1000,1);
return 1;
}