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):
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
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;
}
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 ?
new namestring = strfind(plname, "Vegas", true);
?
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 !!
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;
}
}
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 !