Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: [IF] mariomako poslato Maj 09, 2011, 10:50:35 PRE PODNE

Naslov: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: [IF] mariomako 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: /
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: [A]Dexter poslato Maj 09, 2011, 12:20:59 POSLE PODNE
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

Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: ‹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
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: [IF] mariomako 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
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: ‹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
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: [IF] mariomako poslato Maj 10, 2011, 08:49:14 PRE PODNE
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);
}
}
    }
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: Richard Bentley poslato Maj 10, 2011, 11:05:19 PRE PODNE
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
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: Rotcod 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 ñåêóíäè, çàòîà ñòå èçáàöåíè îä ñåðâåðîâ.");
      }
}
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: [IF] mariomako poslato Maj 10, 2011, 12:17:17 POSLE PODNE
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
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: Rotcod poslato Maj 10, 2011, 19:03:17 POSLE PODNE
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);     
}
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: [IF] mariomako poslato Maj 11, 2011, 08:43:52 PRE PODNE
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;
}
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: Rotcod poslato Maj 11, 2011, 09:48:52 PRE PODNE
Nece raditi jer nisi sve ubacio...
Naslov: Odg: [pomoc] Zasto ne ispisuje poruke nego odma kicka
Poruka od: [IF] mariomako poslato Maj 11, 2011, 09:58:03 PRE PODNE
Citat: eXtreme poslato Maj 11, 2011, 09:48:52 PRE PODNE
Nece raditi jer nisi sve ubacio...

sta sam ispustio ?