help! please! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help! please! (
/showthread.php?tid=213875)
help! please! -
[MKD]Max - 20.01.2011
hello guys i have make and register and login command now i make in player file somethinf like
passwrd =
Level =
Cash =
Banned =
Score =
Now when i ban someone in server in the Name file its not make the banned = 1
Код:
dcmd_ban(playerid,params[])
{
new
Reason[256],
pID,
i;
if(Player[playerid][admin] < 4){
return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command");
}
if(sscanf(params,"us",pID,Reason)){
return SendClientMessage(playerid,COLOR_RED,"|| Usage: /ban [playerid] [reason] ||");
}
if(!IsPlayerConnected(pID)) {
return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
}
new
name[MAX_PLAYER_NAME],
string[128],
string1[128],
string2[128],
string3[128],
string4[128],
givePlayer;
Player[givePlayer][Locked] = 1;
GetPlayerName(pID,name,sizeof(name));
format(string,sizeof(string),"**(ADMIN BAN)** %s(%d) %s",name,pID,Reason);
format(string1,sizeof(string1),"You Have Been BANNED By Admin For Reason: %s",Reason);
format(string2,sizeof(string2),"**If You Think Your Ban UNFAIR**");
format(string3,sizeof(string3),"**Go To Our Website **");
format(string4,sizeof(string4),"**And Make Unban Apply With Right Format**");
SendClientMessageToAll(COLOR_RED,string);
SendClientMessage(i,COLOR_RED,string1);
SendClientMessage(i,COLOR_RED,string2);
SendClientMessage(i,COLOR_RED,string3);
SendClientMessage(i,COLOR_RED,string4);
SaveToFile("BanLog", string); Ban(pID);
return 1;
}
Re: help! please! -
[MKD]Max - 20.01.2011
bump! guys please help why me only all get help only me helppppppp!!!!
Re: help! please! -
-Rebel Son- - 20.01.2011
just make a variable in your enum for it,
Enum
Banned
on your command
Banned++;
Re: help! please! -
[MKD]Max - 20.01.2011
can you qoute the command and tell me where to put Banned++;
Re: help! please! -
[MKD]Max - 20.01.2011
Bump!!! any help please im realy need to
Re: help! please! -
[SU]Balli - 20.01.2011
pawn Код:
dcmd_ban(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][admin] >= 4) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /ban [playerid] [reason]");
if(!strlen(tmp2)) return SendClientMessage(playerid, red, "ERROR: You must give a reason");
new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) ) {
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day,hour,minuite,second; getdate(year, month, day); gettime(hour,minuite,second);
//CMDMessageToAdmins(playerid,"BAN");
format(string,sizeof(string),"Administrator \"%s\" has banned \"%s\" (Reason: %s) ",adminname,playername,params[2]);
SendClientMessageToAll(red,string);
SaveToFile("BanLog",string);
print(string);
if(udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1) dUserSetINT(PlayerName2(player1)).("banned",1) /*&& dUserSetINT(PlayerName2(player1)). "0",2**/;
format(string,sizeof(string),"banned by Administrator %s. Reason: %s", adminname, params[2] );
return BanEx(player1, string);
} else return SendClientMessage(playerid, red, "Player is not connected or is yourself or is the highest level admin");
} else return SendClientMessage(playerid,red,"ERROR: You need to be level 4 or higher to use this command.");
} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
Re: help! please! -
[MKD]Max - 20.01.2011
what i mean first quoete my own command plus show me how to do it on dini no dudb
Re: help! please! -
[MKD]Max - 20.01.2011
help
Re: help! please! -
Elviss - 20.01.2011
give the error or wht you need?
Re: help! please! -
[MKD]Max - 20.01.2011
No error man but i need when i ban someone i need to put in log mean files that is Banned = 1 then he cant join
Exampel:
Passawrd =

?
Name = Maxe
Level = 5
Banned = 1
Cash = 100
Score = 500