spravil som test bez tych prikazov a s nimi a bez nich to ide ale s nimi ne takže to je v tých príkazoch, dám sem tie príkazy
new bool:anketa;
new anketaano;
new anketane;
new anketatext[240];
forward anketatimer();
CMD:anketa(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid, 0xFF0000FF, "Použitie: /anketa -text-");
if(anketa==true) return SendClientMessage(playerid, 0xFF0000FF, "Práve prebieha anketa");
new string[300],name[24];
GetPlayerName(playerid,name,sizeof(name));
format(anketatext,240,"%s",params);
anketa=true;
anketaano=0;
anketane=0;
format(string,sizeof(string),"%s založil anketu: %s",name,anketatext);
SendClientMessageToAll(0x44FF00FF,string);
SetTimer("anketatimer",30000,false);
return CMD_SUCCESS;
}
CMD:ano(playerid,params[])
{
if(anketa==false) return SendClientMessage(playerid, 0xFF0000FF, "Žiadna anketa neprebieha");
new string[240];
anketaano++;
format(string,240,"%s | %d ANO | %d NE",anketatext,anketaano,anketane);
SendClientMessage(playerid,0x44FF00FF,string);
return CMD_SUCCESS;
}
CMD:ne(playerid,params[])
{
if(anketa==false) return SendClientMessage(playerid, 0xFF0000FF, "Žiadna anketa neprebieha");
new string[240];
anketane++;
format(string,240,"%s | %d ANO | %d NE",anketatext,anketaano,anketane);
SendClientMessage(playerid,0x44FF00FF,string);
return CMD_SUCCESS;
}
public anketatimer()
{
new string[240];
format(string,240,"Anketa: %s | %d ANO | %d NE",anketatext,anketaano,anketane);
print(string);
SendClientMessageToAll(0x44FF00FF,string);
anketa=false;
return 1;
}
//EDIT: a počas skúšania som menil aj zcmd aj izcmd ale ani jedno