10.01.2014, 14:10
Hello, I am working in my RP server and need help ,how to change the name format to let the player register with format Firstname_Lastname
,thanks
,thanks
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new namestring = strfind(sendername, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW, "Your name must be in the Firstname_Lastname format - Please re-log with a name such as Amir_AB");
Kick(playerid);
return 1;
}
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new namestring = strfind(sendername, "_", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_YELLOW, "Your name must be in the Firstname_Lastname format - Please re-log with a name such as Amir_AB");
SetTimerEx("KickPlayer", 500, false "i", playerid);
return 1;
}
forward KickPlayer (playerid)
public KickPlayer (playerid)
{
Kick(playerid);
}
forward KickPlayer (playerid);
it make errors when i put the timer
C:\Users\Hossam\Downloads\Compressed\Italy Mafia Vers6\pawno\mafia02.pwn(5342) : error 001: expected token: ",", but found "-string-" C:\Users\Hossam\Downloads\Compressed\Italy Mafia Vers6\pawno\mafia02.pwn(5342) : warning 215: expression has no effect C:\Users\Hossam\Downloads\Compressed\Italy Mafia Vers6\pawno\mafia02.pwn(5342) : warning 215: expression has no effect C:\Users\Hossam\Downloads\Compressed\Italy Mafia Vers6\pawno\mafia02.pwn(5342) : error 001: expected token: ";", but found ")" C:\Users\Hossam\Downloads\Compressed\Italy Mafia Vers6\pawno\mafia02.pwn(5342) : error 029: invalid expression, assumed zero C:\Users\Hossam\Downloads\Compressed\Italy Mafia Vers6\pawno\mafia02.pwn(5342) : fatal error 107: too many error messages on one line |