some of my commands are not working.. - 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: some of my commands are not working.. (
/showthread.php?tid=294001)
some of my commands are not working.. -
wes231 - 30.10.2011
kick
ban
sban
permaban
all that stuff my dealership create isnt working...
uhmmm
this is my kick command what is wrong with it...
And yeah
Thanks If you know how to fix ill send you my script and you can try and fix
Quote:
CMD:kick(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
{
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin] && (PlayerInfo[giveplayerid][pHelper] >= 2 || PlayerInfo[giveplayerid][pAdmin] > 0) && playerid != giveplayerid)
{
format(string, sizeof(string), "AdmCmd: %s has been auto-kicked, reason: Trying to /kick a higher admin.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_YELLOW,string, (PlayerInfo[playerid][pAdmin] == 1) ? (1) : (2));
Kick(playerid);
return 1;
}
|
Re: some of my commands are not working.. -
Vince - 30.10.2011
INDENTATION! I see 4 opening brackets, but only 1 closing bracket.
Re: some of my commands are not working.. -
wes231 - 30.10.2011
Can u edit it and show me and if it works i can do tO rest
Re: some of my commands are not working.. -
wes231 - 30.10.2011
There should be 4 closing brackets?
Re: some of my commands are not working.. -
wes231 - 30.10.2011
Will give respect to who helps
Re: some of my commands are not working.. -
sleepysnowflake - 30.10.2011
pawn Код:
CMD:kick(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
{
new string[128], giveplayerid, reason[64];
if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin] && (PlayerInfo[giveplayerid][pHelper] >= 2 || PlayerInfo[giveplayerid][pAdmin] > 0) && playerid != giveplayerid)
{
format(string, sizeof(string), "AdmCmd: %s has been auto-kicked, reason: Trying to /kick a higher admin.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_YELLOW,string, (PlayerInfo[playerid][pAdmin] == 1) ? (1) : (2));
Kick(playerid);
}
}
}
return 1;
}
Re: some of my commands are not working.. -
wes231 - 30.10.2011
does not work.. uhm when i do /kick 1 test it says /kick id reason ... how can if ix?
Re: some of my commands are not working.. -
Stigg - 30.10.2011
Edit: Misread sorry.
Re: some of my commands are not working.. -
wes231 - 30.10.2011
says
USAGE: /kick [playerid] [reason]
Re: some of my commands are not working.. -
wes231 - 30.10.2011
could it be the helper that is fucking it oveR?