05.02.2011, 00:59
It make everyone to reconnect.
I want it like...
THE player who type the command, reconnect.
I gonna use this for a register dialog system
When he register, the game restart for him.
I want it like...
THE player who type the command, reconnect.
I gonna use this for a register dialog system
When he register, the game restart for him.
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
if(GetPVarInt(playerid, "Reconnect") == 1)
{
new string[25], playerIP[16];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
format(string, sizeof(string), "unbanip %s",playerIP);
SendRconCommand(string);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(reconnect, 9, cmdtext);
return 0;
}
dcmd_reconnect(playerid, params[])
{
#pragma unused params
SetPVarInt(playerid, "Reconnect", 1);
new string[23], playerIP[16];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
format(string, sizeof(string), "banip %s",playerIP);
SendRconCommand(string);
return 1;
}