SA-MP Forums Archive
Temp ban - 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: Temp ban (/showthread.php?tid=478063)



Temp ban - ConnorFisher - 27.11.2013

I only have temp ban but I don't know how to make like /tempban %s has been banned for %s days by %s reason: %s


Re: Temp ban - DaTa[X] - 27.11.2013

may this can help


Re: Temp ban - feartonyb - 27.11.2013

Define vars on command tempban then use this:

Код:
new tempbanstring[128];
new AdminName[MAX_PLAYER_NAME], BannedName[MAX_PLAYER_NAME];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(playerid, BannedName, sizeof(BannedName));
format(tempbanstring, sizeof(tempbanstring), "%s has been banned for %d days by %s reason: %s", BannedName, BanTime, AdminName, BanReason);
SendClientMessageToAll(-1, tempbanstring);
We asume you defined variables BanTime and BanReason in command.