Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Vegas. poslato Februar 12, 2012, 20:59:20 POSLE PODNE

Naslov: [Pomoć] Ime_Prezime ...
Poruka od: Vegas. poslato Februar 12, 2012, 20:59:20 POSLE PODNE
Skripta koju koristim: Moj ...
Detaljan opis problema: Kako da napravim da mogu samo ja sa imenom Vegas. ulaziti ?
Dio skripte: Evo OnPlayerConnect public OnPlayerConnect(playerid)
{
//------------------------------------------------------------------------------
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
if(Security != 0)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
    Kick(playerid);
    return 1;
}
    new namestring = strfind(plname, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Imigracioni Odsek: Vase ime nije prihvatljivo.");
SendClientMessage(playerid, COLOR_YELLOW2, "Podsetnik: Vase ime mora biti u formatu Ime_Prezime.");
Kick(playerid);
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Naslov: Odg: [Pomoć] Ime_Prezime ...
Poruka od: Impulseâ„¢ poslato Februar 12, 2012, 23:23:35 POSLE PODNE
public OnPlayerConnect(playerid)
{
//------------------------------------------------------------------------------
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
if(Security != 0)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
    Kick(playerid);
    return 1;
}

ovako stavi,izbaciva ce ti erora ovde ih postaj
Naslov: Odg: [Pomoć] Ime_Prezime ...
Poruka od: propalica2131231 poslato Februar 13, 2012, 11:50:17 PRE PODNE
Citat: Impulse! poslato Februar 12, 2012, 23:23:35 POSLE PODNE
public OnPlayerConnect(playerid)
{
//------------------------------------------------------------------------------
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
if(Security != 0)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
    Kick(playerid);
    return 1;
}

ovako stavi,izbaciva ce ti erora ovde ih postaj
sta mu dajes ako ce error izbacit ?
stavi ovo u OnPlayerConnect

  new namestring = strfind(plname, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Centar za imigraciju !");
SendClientMessage(playerid, COLOR_YELLOW2, "Ime mora biti u formatu Ime_Prezime.");
Kick(playerid);
return 1;
}

Naslov: Odg: [Pomoć] Ime_Prezime ...
Poruka od: Vegas. poslato Februar 13, 2012, 12:25:53 POSLE PODNE
Citat: [TL:RP]Dr.Nin0 poslato Februar 13, 2012, 11:50:17 PRE PODNE
Citat: Impulse! poslato Februar 12, 2012, 23:23:35 POSLE PODNE
public OnPlayerConnect(playerid)
{
//------------------------------------------------------------------------------
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
if(Security != 0)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
    Kick(playerid);
    return 1;
}

ovako stavi,izbaciva ce ti erora ovde ih postaj
sta mu dajes ako ce error izbacit ?
stavi ovo u OnPlayerConnect

  new namestring = strfind(plname, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Centar za imigraciju !");
SendClientMessage(playerid, COLOR_YELLOW2, "Ime mora biti u formatu Ime_Prezime.");
Kick(playerid);
return 1;
}

A gdje da upišem da samo ja sa nickom "Vegas." mogu ulaziti na server ?
Naslov: Odg: [Pomoć] Ime_Prezime ...
Poruka od: MT3 bolinx poslato Februar 13, 2012, 12:31:05 POSLE PODNE
new namestring = strfind(plname, "Vegas", true);?
Naslov: Odg: [Pomoć] Ime_Prezime ...
Poruka od: Vegas. poslato Februar 13, 2012, 12:50:26 POSLE PODNE
Citat: Paul McCartney poslato Februar 13, 2012, 12:31:05 POSLE PODNE
new namestring = strfind(plname, "Vegas", true);?
Respect for you :D ! Pomogao si mi, hvala i ostalima !!
Naslov: Odg: [Pomoć] Ime_Prezime ...
Poruka od: [DV]Teške poslato Februar 13, 2012, 15:39:41 POSLE PODNE
Probaj ovako  ;D
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
if(Security != 0)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
    Kick(playerid);
    return 1;
}
if(strcmp(plname, "Vegas",false))
{
    new namestring = strfind(plname, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Vase ime nije prihvatljivo.");
SendClientMessage(playerid, COLOR_YELLOW2, "Vase ime mora biti u formatu Ime_Prezime.");
Kick(playerid);
return 1;
}
}
Naslov: Odg: [Pomoć] Ime_Prezime ...
Poruka od: Vegas. poslato Februar 13, 2012, 20:10:11 POSLE PODNE
Citat: nemanjatesic96 poslato Februar 13, 2012, 15:39:41 POSLE PODNE
Probaj ovako  ;D
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
if(Security != 0)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
    Kick(playerid);
    return 1;
}
if(strcmp(plname, "Vegas",false))
{
    new namestring = strfind(plname, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Vase ime nije prihvatljivo.");
SendClientMessage(playerid, COLOR_YELLOW2, "Vase ime mora biti u formatu Ime_Prezime.");
Kick(playerid);
return 1;
}
}

Uradio sam već :D ... BTW Hvala !