[pomoc] Zasto ne ispisuje poruke nego odma kicka

Započeo [IF] mariomako, Maj 09, 2011, 10:50:35 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skriptu koju koristim: moji gamemode od 0
Detaljan opis problema: Napravio sam moji public i postavio timer, ali u publicu ne ispisuje poruke posle odredeno vreme nego samo kicka
Dio skripte: public nologinkick(playerid)
{
    if(GetPVarInt(playerid, "Logged") == 0)
{
if(GetPVarInt(playerid,"language")==1)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] Not logged in within 60 seconds because you are kicked from the server.");
}
else if(GetPVarInt(playerid,"language")==2)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] Íå ñå íà¼àâèâòå âî ðîê îä 60 ñåêóíäè, çàòîà ñòå èçáàöåíè îä ñåðâåðîâ.");
}
Kick(playerid);
}
return 1;
}

Slike: /

Citat: Mario Velickovski poslato Maj 09, 2011, 10:50:35 PRE PODNE
Skriptu koju koristim: moji gamemode od 0
Detaljan opis problema: Napravio sam moji public i postavio timer, ali u publicu ne ispisuje poruke posle odredeno vreme nego samo kicka
Dio skripte: public nologinkick(playerid)
{
   if(GetPVarInt(playerid, "Logged") == 0)
{
if(GetPVarInt(playerid,"language")==1)
{
   SendClientMessage(playerid, COLOR_ORANGE, "[*] Not logged in within 60 seconds because you are kicked from the server.");
}
else if(GetPVarInt(playerid,"language")==2)
{
   SendClientMessage(playerid, COLOR_ORANGE, "[*] Íå ñå íà¼àâèâòå âî ðîê îä 60 ñåêóíäè, çàòîà ñòå èçáàöåíè îä ñåðâåðîâ.");
}
Kick(playerid);
}
return 1;
}

Slike: /


Probaj to .... neznam oce li radit ... gore u citatu sam ti komandu napravio valjda

Poslednja Izmena: Maj 09, 2011, 12:22:04 POSLE PODNE od Dexter

zaljepi ovdje onaj dio kad igrac odabere koji jezik koristi..nezz jel ti to na registraciji ili gdje vec

Citat: Stjepan_Fox poslato Maj 09, 2011, 14:56:42 POSLE PODNE
zaljepi ovdje onaj dio kad igrac odabere koji jezik koristi..nezz jel ti to na registraciji ili gdje vec

to je sve lepo izabrao igrac, ako nije izabrao nema da stigne do ovaj korak :D

Citat: Mario Velickovski poslato Maj 09, 2011, 19:10:46 POSLE PODNE
Citat: Stjepan_Fox poslato Maj 09, 2011, 14:56:42 POSLE PODNE
zaljepi ovdje onaj dio kad igrac odabere koji jezik koristi..nezz jel ti to na registraciji ili gdje vec

to je sve lepo izabrao igrac, ako nije izabrao nema da stigne do ovaj korak :D
pa iz pawna zaljepi ovdje taj dio gdje je izabrao jezik

Citat: Stjepan_Fox poslato Maj 09, 2011, 19:16:05 POSLE PODNE
Citat: Mario Velickovski poslato Maj 09, 2011, 19:10:46 POSLE PODNE
Citat: Stjepan_Fox poslato Maj 09, 2011, 14:56:42 POSLE PODNE
zaljepi ovdje onaj dio kad igrac odabere koji jezik koristi..nezz jel ti to na registraciji ili gdje vec

to je sve lepo izabrao igrac, ako nije izabrao nema da stigne do ovaj korak :D
pa iz pawna zaljepi ovdje taj dio gdje je izabrao jezik

nije do to 100%, jel kad izabare jezik ispise poruku, na igraca, kod mene ispise i za druge komande radi jezik ali na ovo neradi :(

inace evo ti dio:

if(dialogid==DIALOG_LANG)
{
switch(listitem)
{
case 0:
{
SetPVarInt(playerid,"language",1);
SendClientMessage(playerid, COLOR_LIMEGREEN, "[*] Ok, your language is English!");
SendClientMessage(playerid, COLOR_ORANGE, "[*] Welcome to ..:: Infinity DM/Stunt ::..");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SetupPlayerForRegisterLogin(playerid);
}
case 1:
{
SetPVarInt(playerid,"language",2);
SendClientMessage(playerid, COLOR_LIMEGREEN, "[*] Ã,î ðåä, âàøèîò ¼àçèê Ã¥ Ìàêåäîíñêè!");
SendClientMessage(playerid, COLOR_ORANGE, "[*] Ã,,îáðîäî¼äîâòå íà ..:: Infinity DM/Stunt ::..");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SetupPlayerForRegisterLogin(playerid);
}
}
    }

O cemu se ovde radi, objasni malo, da bih mogao da znam o cemu se radi, znam sigurno da ti pomognem jer i ja upravo prevodim server


public nologinkick(playerid)
{
   if(GetPVarInt(playerid, "Logged") != 0) return Kick(playerid);
       if(GetPVarInt(playerid,"language")==1)
       {
          SendClientMessage(playerid, COLOR_ORANGE, "[*] Not logged in within 60 seconds because you are kicked from the server.");
       }
       else if(GetPVarInt(playerid,"language")==2)
      {
           SendClientMessage(playerid, COLOR_ORANGE, "[*] Íå ñå íà¼àâèâòå âî ðîê îä 60 ñåêóíäè, çàòîà ñòå èçáàöåíè îä ñåðâåðîâ.");
      }
}
Poslednja Izmena: Maj 10, 2011, 12:07:11 POSLE PODNE od eXtreme

Citat: eXtreme poslato Maj 10, 2011, 12:06:58 POSLE PODNE

public nologinkick(playerid)
{
   if(GetPVarInt(playerid, "Logged") != 0) return Kick(playerid);
       if(GetPVarInt(playerid,"language")==1)
       {
          SendClientMessage(playerid, COLOR_ORANGE, "[*] Not logged in within 60 seconds because you are kicked from the server.");
       }
       else if(GetPVarInt(playerid,"language")==2)
      {
           SendClientMessage(playerid, COLOR_ORANGE, "[*] Íå ñå íà¼àâèâòå âî ðîê îä 60 ñåêóíäè, çàòîà ñòå èçáàöåíè îä ñåðâåðîâ.");
      }
}


hvala a ovo mi treba za jednu drugu komandu, kako napraviti posle return da ima { } blok za vise naredbe i uslova :D

Mozes i ovako

public nologinkick(playerid)
{
    if(GetPVarInt(playerid, "Logged") == 0)
    {
        if(GetPVarInt(playerid,"language")==1)
        {
           SendClientMessage(playerid, COLOR_ORANGE, "[*] Not logged in within 60 seconds because you are kicked from the server.");
        }
        else if(GetPVarInt(playerid,"language")==2)
       {
            SendClientMessage(playerid, COLOR_ORANGE, "[*] Íå ñå íà¼àâèâòå âî ðîê îä 60 ñåêóíäè, çàòîà ñòå èçáàöåíè îä ñåðâåðîâ.");
       }
    }
    return Kick(playerid);     
}

a jel ovo:

CMD:register(playerid, params[])
{
if(GetPVarInt(playerid, "Logged"))
{
if(GetPVarInt(playerid,"language")==1)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] You're already logged in!");
}
else if(GetPVarInt(playerid,"language")==2)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] Ã,èå ñòå íà¼àâåíè.");
}
}
else
{
if(isnull(params))
{
if(GetPVarInt(playerid,"language")==1)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] Usage: /register [pass]");
}
else if(GetPVarInt(playerid,"language")==2)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] Ã"ïîòðåáà: /register [ëîçèíêà]");
}
}
else
{
new Query[320], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
mysql_real_escape_string(pName, pName);
format(Query, sizeof Query, "SELECT * FROM `accounts` WHERE `Name` = '%s' LIMIT 1", pName);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows())
{
if(GetPVarInt(playerid,"language")==1)
{
  SendClientMessage(playerid, COLOR_ORANGE, "[*] An account already exists under that name! Use \"/login\" to log in.");
        mysql_free_result();
}
else if(GetPVarInt(playerid,"language")==2)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] Ã,àøàòà êîðèñíè÷êà ñìåòêà ïîñòîè, êîðèñòèòå \"/login\" çà äà ñå íà¼àâèòå.");
        mysql_free_result();
}
return 1;
}
mysql_free_result();
WP_Hash(Query, 129, params);
new IP[16];
GetPlayerIp(playerid, IP, 16);
format(Query, sizeof Query, "INSERT INTO `accounts` (Name, Password, IP, Admin, Money, Score, Kills, Deaths) VALUES ('%s', '%s', '%s', %i, %i, %i, %i, %i)",
    pName,
    Query,
    IP,
    GetPVarInt(playerid, "Admin"),
    GetPlayerMoney(playerid),
    GetPlayerScore(playerid),
    GetPVarInt(playerid, "Kills"),
    GetPVarInt(playerid, "Deaths"));
mysql_query(Query);
SetPVarInt(playerid, "Logged", 1);
if(GetPVarInt(playerid,"language")==1)
{
SendClientMessage(playerid, COLOR_LIMEGREEN, "[*] Succesfully registered and automatically logged in!");
}
else if(GetPVarInt(playerid,"language")==2)
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] Ã"ñïåøíî ñå ðåãèñòðèðàâòå è àâòîìàòñêè ñòå íà¼àâåíè!");
}
}
}
return 1;
}


radice isto ko ovo:

CMD:register(playerid, params[])
{
if(GetPVarInt(playerid, "Logged")) return SendClientMessage(playerid, COLOR_ORANGE, "[*] You're already logged in!");
if(isnull(params)) return SendClientMessage(playerid, COLOR_ORANGE, "[*] Usage: /register [pass]");
new Query[320], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
mysql_real_escape_string(pName, pName);
format(Query, sizeof Query, "SELECT * FROM `accounts` WHERE `Name` = '%s' LIMIT 1", pName);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows())
{
SendClientMessage(playerid, COLOR_ORANGE, "[*] An account already exists under that name! Use \"/login\" to log in!");
mysql_free_result();
return 1;
}
mysql_free_result();
WP_Hash(Query, 129, params);
new IP[16];
GetPlayerIp(playerid, IP, 16);
format(Query, sizeof Query, "INSERT INTO `accounts` (Name, Password, IP, Admin, Money, Score, Kills, Deaths) VALUES ('%s', '%s', '%s', %i, %i, %i, %i, %i)",
    pName,
    Query,
    IP,
    GetPVarInt(playerid, "Admin"),
    GetPlayerMoney(playerid),
    GetPlayerScore(playerid),
    GetPVarInt(playerid, "Kills"),
    GetPVarInt(playerid, "Deaths"));
mysql_query(Query);
SetPVarInt(playerid, "Logged", 1);
SendClientMessage(playerid, COLOR_LIMEGREEN, "[*] Succesfully registered and automatically logged in!");
return 1;
}