Dobrý večer. Chtěl bych se zeptat, jestli někdo nemá podobnou zkušenost. Rozhodl jsem se udělat pro adminy možnost měnit čas. Když mám kód samostatný bez podmínky, jestli se jedná o admina, tak změna času v pohodě funguje, ale když přidám do kódu podmínku na admina, tak se mi náhle kód znefunkční. Nevím co dělám špatně, ale když dám kamkoliv do kódu tu podmínku, tak se to chová stejně.. Zde je kód:
if(!strcmp(cmdtext, "/cas", true, 4)){
new cas,text[256],admin[MAX_PLAYER_NAME];
if(!sscanf(cmdtext[5], "i",cas)){
if(cas < 25){
if(IsPlayerAdmin(playerid)){
GetPlayerName(playerid,admin,sizeof(admin));
format(text,sizeof(text),"|Sever| - Admin %s změnil čas na %d",admin,cas);
Dotaz
Marks 0
Dobrý večer. Chtěl bych se zeptat, jestli někdo nemá podobnou zkušenost. Rozhodl jsem se udělat pro adminy možnost měnit čas. Když mám kód samostatný bez podmínky, jestli se jedná o admina, tak změna času v pohodě funguje, ale když přidám do kódu podmínku na admina, tak se mi náhle kód znefunkční. Nevím co dělám špatně, ale když dám kamkoliv do kódu tu podmínku, tak se to chová stejně.. Zde je kód:
Link to comment
Share on other sites
16 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now