14.09.2012, 14:59
Ok i have a problem with a warn command that is made like when a player gets 3 warns ge gets kicked but it doesn't kick him at 3 it just goes up so Example: Warned[9/3]!
here is the command:
And something that goes with it:
And i want to change this by using the savig system. The one i use:
https://sampforum.blast.hk/showthread.php?tid=269361
I Give +REP.
Thaks in Advance!!!
here is the command:
pawn Код:
CMD:warn(playerid,params[]) {
if (pInfo[playerid][pAdmin] >= 1) {
new id,reason[100],str[128],GPlayerName[MAX_PLAYER_NAME];
if(sscanf(params,"ds",id,reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /warn <playerid> <reason>");
if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected.");
if(pInfo[id][pAdmin] > pInfo[playerid][pAdmin])return SendClientMessage(playerid,COLOR_RED,"ERROR: He/She is a greater level than your level.");
GetPlayerName(id,str,MAX_PLAYER_NAME);
GetPlayerName(playerid, GPlayerName, sizeof(GPlayerName));
if(warned[id] == 3) {
new plrIP[64];
GetPlayerIp(id, plrIP, 64);
new Year, Month, Day;
getdate(Year, Month, Day);
format(szString, sizeof(szString), "*** ADMIN KICK: %s (%d) Has Been Kicked: Warning: [3/3]", str, id);
SendClientMessageToAll(0xFF444499, szString);
TogglePlayerControllable(id,0);
ResetPlayerWeapons(id);
SetPlayerInterior(id,10);
SetPlayerPos(id, 366.9682,-57.3005,1001.5103);
SetPlayerCameraPos(id, 366.8701,-61.6168,1002.5078);
SetPlayerCameraLookAt(id, 366.9682,-57.3005,1001.5103);
SetPlayerFacingAngle(id, 180 );
ApplyAnimation(id,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
GameTextForPlayer(id,"~w~You've Been ~r~Kicked ~w~Fron The Server",5000,5);
format(szString, sizeof(szString), "* Admin: %s (%d) Has Kicked You - Date: %02d/%02d/%d - Your IP: %s - Reason: Warnings:[3/3]", GPlayerName, playerid, Day, Month, Year, plrIP);
SendClientMessage(id, 0x00B359FF, szString);
Kick(id);
}
else {
warned[id]++;
format(str, sizeof(str), "*** ADMIN WARN: %s (%d) Has Been Warned. [%d/3]; Reason: %s", str, id, pInfo[id][pWarned], reason);
SendClientMessageToAll(COLOR_RED, str);
}
}
else {
return 0;
}
return 1;
}
pawn Код:
public warned1(playerid) {
if (warned[playerid] == 1) {
warned[playerid] = 1;
}
if (warned[playerid] == 2) {
warned[playerid] = 2;
}
if (warned[playerid] == 3) {
warned[playerid] = 3;
}
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=269361
I Give +REP.
Thaks in Advance!!!