Započeo TonyP
•13. Jul 2013.• Zaključano[Pomoc]"Marko_Markovic" da bude "Marko"
374
pregleda
7
postova
Rookie
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
50 / 100 XP
Početnik(0)
1
Postovi:
0
Teme:
Pridružio se:Jun 2012
13. Jul 2013.
stock GetPlayersName(playerid)
{
new playersName;
GetPlayerName(playerid, playersName, MAX_PLAYER_NAME);
for(new i = 0; i < strlen(playersName); i++)
{
if(playersName == '_') playersName = ' ';
}
return playersName;
}Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
241 / 250 XP
Početnik(0)
731
Postovi:
54
Teme:
Pridružio se:Sep. 2010
13. Jul 2013.
Slade wrote on July 13, 2013, 3:10 pm:
stock GetPlayersName(playerid)
{
new playersName;
GetPlayerName(playerid, playersName, MAX_PLAYER_NAME);
for(new i = 0; i < strlen(playersName); i++)
{
if(playersName == '_') playersName = ' ';
}
return playersName;
}Pro skripteru....
http://balkan-samp.com/forum/index.php?topic=69578.0
i najgore je to Å¡to postoji puno bolji naÄin da uopće ni ne trebaÅ¡ koristiti petlju, koriÅ¡tenjem strfind funkcije....
Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,343
Postovi:
84
Teme:
Pridružio se:Okt. 2012
14. Jul 2013.
Quote from July 14, 2013, 3:29 am:
public OnPlayerConnect(playerid)
{
new plname;
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, "{FFFFFF}[{F81414}FantasyAS{FFFFFF}] {F81414}Vase ime nije prihvatljivo.");
SendClientMessage(playerid, COLOR_YELLOW2, "{FFFFFF}[{F81414}FantasyAS{FFFFFF}] {F81414}Vase ime mora biti u formatu {FFFFFF}Ime_Prezime.");
Kick(playerid);
return 1;
}Ovo je iz moga moda tako je i tebi koji god mod korisis ti samo napravi ovo
public OnPlayerConnect(playerid)
{
new plname;
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);
new kurcina = strfind(plname, "Benac", true);
if(kurcina == -1 && namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW2, "{FFFFFF}[{F81414}FantasyAS{FFFFFF}] {F81414}Vase ime nije prihvatljivo.");
SendClientMessage(playerid, COLOR_YELLOW2, "{FFFFFF}[{F81414}FantasyAS{FFFFFF}] {F81414}Vase ime mora biti u formatu {FFFFFF}Ime_Prezime.");
Kick(playerid);
return 1;
}Skuzio ? 🙂
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava