When player leave your server. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: When player leave your server. (
/showthread.php?tid=501588)
When player leave your server. -
ChristianIvann09 - 19.03.2014
When a player leaves to my server. and im on admin duty. i can see if they are (Leave/Timeout/Kick/Banned)
I have this but i dont know how to script.. if you are on admin duty you will see this message:
Код:
new string[128];
switch (reason)
{
case 0:
{
format(string, sizeof(string), "%s has left the server (timeout).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
if(PlayerCuffed[playerid] != 0)
{
strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (timeout)", 64);
PlayerInfo[playerid][pJailed] = 3;
PlayerInfo[playerid][pJailTime] += 30*60;
}
}
case 1:
{
format(string, sizeof(string), "%s has left the server (leaving).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
if(PlayerCuffed[playerid] != 0)
{
strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (leaving)", 64);
PlayerInfo[playerid][pJailed] = 3;
PlayerInfo[playerid][pJailTime] += 20*60;
}
}
case 2:
{
format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
}
admin duty variable
Re: When player leave your server. -
ChristianIvann09 - 19.03.2014
Bump
Re: When player leave your server. -
UnknownOwner - 19.03.2014
Remove the ProxDetector from the code..
Re: When player leave your server. -
ChristianIvann09 - 19.03.2014
Quote:
Originally Posted by UnknownOwner
Remove the ProxDetector from the code..
|
o_O??
Re: When player leave your server. -
Calabresi - 19.03.2014
pawn Код:
new string[128];
switch (reason)
{
case 0:
{
format(string, sizeof(string), "%s has left the server (timeout).", GetPlayerNameEx(playerid));
if(PlayerCuffed[playerid] != 0)
{
strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (timeout)", 64);
PlayerInfo[playerid][pJailed] = 3;
PlayerInfo[playerid][pJailTime] += 30*60;
}
}
case 1:
{
format(string, sizeof(string), "%s has left the server (leaving).", GetPlayerNameEx(playerid));
if(PlayerCuffed[playerid] != 0)
{
strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64);
strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (leaving)", 64);
PlayerInfo[playerid][pJailed] = 3;
PlayerInfo[playerid][pJailTime] += 20*60;
}
}
case 2:
{
format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
}
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(AdminDuty[i] == 1) SendClientMessage(i, -1, string);
}