moze pomoc oko /kick i /ban

Započeo Kiki_Radeon, Jun 03, 2010, 15:41:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ja i frendovi se zajebavamo na kucnom hostu, i ja htio kick jednog fredna ono pise mi /kick: You are not an Admin tako i za ban! ja promijenio i /kick i /ban i opet mi to dode moze pomoc?

znas sto bi bilo dobro?...
da posdtas kod :S...


eto.. radi kad se loginam s /rcon login, ali ja bi da bez toga mogu kicki ban! tnx
//----------------------------------[Kick]------------------------------------------------
   if(strcmp(cmd, "/kick", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1||PlayerInfo[playerid][pGameMaster] >= 2)
{
if(IsPlayerConnected(giveplayerid))
{
   if(giveplayerid != INVALID_PLAYER_ID)
   {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), ">%s izbacen si od admina %s,Razlog: %s",giveplayer,sendername, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
                       format(string, 256, ">%s je izbacen od admina %s,Razlog: %s",giveplayer,sendername,(result));
                       ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "RPArena Team: %s je kickan od Admina/GameMastera %s, Razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
KickLog(string);
Kick(giveplayerid);
return 1;
}
}
}
else
{
format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
if(strcmp(cmd, "/skick", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /skick [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1||PlayerInfo[playerid][pGameMaster] >= 3)
{
if(IsPlayerConnected(giveplayerid))
{
   if(giveplayerid != INVALID_PLAYER_ID)
   {
       Kick(giveplayerid);
   }
}
}
else
{
format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
if(strcmp(cmd, "/kickres", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if (PlayerInfo[playerid][pAdmin] < 1)
{
return 1;
}
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kickres [level] [ammount]");
return 1;
}
new level = strval(tmp);
if(level < 0 || level > 5) { SendClientMessage(playerid, COLOR_GREY, "   Can only Reserved Slots Kick from level 0 to 5 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kickres [level] [ammount]");
return 1;
}
new ammount = strval(tmp);
if(ammount < 1 || ammount > 10) { SendClientMessage(playerid, COLOR_GREY, "   Can only Reserved Slots Kick of a maximum of 10 players !"); return 1; }
for(new i = 0; i < MAX_PLAYERS; i++)
{
   if(IsPlayerConnected(i))
   {
       if(PlayerInfo[i][pLevel] == level && PlayerInfo[i][pAdmin] < 1 && PlayerInfo[i][pDonateRank] < 1 && ammount > 0)
       {
           ammount -= 1;
Kick(i);
       }
   }
}
}
return 1;
}
if(strcmp(cmd, "/warn", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /warn [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
   if(IsPlayerConnected(giveplayerid))
   {
       if(giveplayerid != INVALID_PLAYER_ID)
       {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /warn [playerid/PartOfName] [reason]");
return 1;
}
PlayerInfo[giveplayerid][pWarns] += 1;
if(PlayerInfo[giveplayerid][pWarns] >= 5)
{
   new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "Admin: %s je banan od %s, Razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
format(string, sizeof(string), "Ban: %s , Adm: %s,Razlog: 5 warn ", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
PlayerInfo[giveplayerid][pLevel] = -999;
Ban(giveplayerid);
return 1;
}
format(string, sizeof(string), "Upozorio si %s, Razlog: %s", giveplayer, (result));
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), ">%s dobio si upozorenje od admina %s,Razlog: %s",giveplayer,sendername, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
   if(strcmp(cmd, "/sban", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sban [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
   if(IsPlayerConnected(giveplayerid))
   {
       if(giveplayerid != INVALID_PLAYER_ID)
       {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sban [playerid/PartOfName] [reason]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "Admin: %s je banan od %s, Razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
PlayerInfo[giveplayerid][pLevel] = -999;
Ban(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
   }
if(strcmp(cmd, "/ban", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
   if(IsPlayerConnected(giveplayerid))
   {
       if(giveplayerid != INVALID_PLAYER_ID)
       {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "Arena: %s je banan od %s, Razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
format(string, sizeof(string), ">%s banan si od admina %s,Razlog: %s",giveplayer,sendername, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
format(string, 256, ">%s je banan od admina %s,Razlog: %s",giveplayer,sendername,(result));
                       ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "Ban: %s , Adm: %s ", giveplayer, sendername);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
PlayerInfo[giveplayerid][pLevel] = -999;
Ban(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Poslednja Izmena: Jun 03, 2010, 16:00:54 POSLE PODNE od Kiki_Radeon

Moras izbrisati jednu filterscriptu u kojoj su te komande...
Poslednja Izmena: Jun 03, 2010, 16:11:02 POSLE PODNE od Slick_Crack
Mysterious roleplay

točnije ukloni FS pod imenom BASE iz server.cfg i sve će ti biti oke





CroStreets RolePlay Trucking SA-MP Server IP: 88.198.69.101:7797 Web: www.crostreets.com