Hali all.Az lenne nekem a kérésem, hogy itt ez a parancs:
// Bans a player for (days, hours, minutes, seconds)
COMMAND:ban(playerid, params[])
{
// Setup local variables
new PlayerToBan, Days, Hours, Reason[128], TotalBanTime, Msg[128], Name[24], AdminName[24];
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/ban\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player\'s admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 3)
{
if (sscanf(params, \"uiis[128]\", PlayerToBan, Days, Hours, Reason))
SendClientMessage(playerid, 0xFF0000AA, \"Használat: \\\"/ban <PlayerToBan> <Days> <Hours> <Reason>\\\"\");
else
{
if (IsPlayerConnected(PlayerToBan))
{
// Get the names of the player and the admin who executed the ban
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(PlayerToBan, Name, sizeof(Name));
// Increase the number of bans
APlayerData[PlayerToBan][bans]++;
// Calculate the total bantime (when the player can login again)
TotalBanTime = (Days * 86400) + (Hours * 3600) + gettime();
// Check if this is the player\'s 5th ban
if (APlayerData[PlayerToBan][bans] == 5)
APlayerData[PlayerToBan][banTime] = 2147483640; // Make the ban permanent (as high as it can go)
else
APlayerData[PlayerToBan][banTime] = TotalBanTime; // Store this value for the player
// Inform the player about his ban
// Check if this is the player\'s 5th ban
if (APlayerData[PlayerToBan][bans] == 5)
{
format(Msg, 128, \"Egy admin banolt a szerverrõl.Admin neve: %s\", AdminName);
SendClientMessage(PlayerToBan, 0x808080FF, Msg);
}
else
{
format(Msg, 128, \"bannolt: %s idõre: %i nap és %i óra\", AdminName, Days, Hours);
SendClientMessage(PlayerToBan, 0x808080FF, Msg);
format(Msg, 128, \"Indok: %s\", Reason);
SendClientMessage(PlayerToBan, 0x808080FF, Msg);
}
// Kick the player (his data will be saved)
Kick(PlayerToBan);
// Inform everybody else which player was banned and for how long
format(Msg, 128, \"%s %s banolta %s %i napra és %i órára\", AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminName, Name, Days, Hours);
SendClientMessageToAll(0x808080FF, Msg);
}
}
}
else
return 0;
}
else
return 0;
return 1;
}
És így csak a játékos nevét banolja idõre és a neve után rak egy pontot és már jön fel vissza.Nekem olyan kéne, hogy banolja ki a játékos ipjét,nevét és idõre.Például:200 napra, és 200 nap után oldja fel a tiltást. :) Aki tud benne segíteni annak elõre is köszi :)
Nem lehet ezt egy parancsba megoldani? :) Muszáj hozzá filterscriptbe berakni? :)
Ez include, nem filterscript. Berakod a pawno/include mappába, módod elejére:
#include <fájlnév>
És használod a függvényeket, nem nehéz.
[/quote]
Beraktam includeba beleírtam a modba is és azt az errort dobta ki a mod, hogy az az include nem olvasható.
Megpróbáltam berakni filterscriptbe is ott beolvasta nem volt error belépek modba beírom a parancsot és Unknown Command.
Itt az include error:
C:\\Documents and Settings\\Zoli\\Asztal\\server\\gamemodes\\PPC_Trucking.pwn(23) : fatal error 100: cannot read from file: \"a_tban\"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.