Help me pls
#1

i am maked the clan bT but,
when i make someone bt level after next join/server restart it just reseted
how to fix this
Reply
#2

pls help me
Reply
#3

24 hour bumps only...

This is going to need the command that you make them a clan member in, and show your Save Player function, and show where that function gets called in OnPlayerDisconnect.
Reply
#4

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
24 hour bumps only...

This is going to need the command that you make them a clan member in, and show your Save Player function, and show it where that function gets called in OnPlayerDisconnect.
everything is ok but its not saving
every next join/server restart its gone
it saving in files but not saving
Reply
#5

And that's why I asked for what I asked for...

And if it's saving in the file, then not working on relogging, then you need to show the load player function, and where that's called in the 'on login' loading, because obviously that can't be called in OnPlayerConnect or it will be insecure.
Reply
#6

CMDetbt(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][BT] < return ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "ERROR", "You need to be higher bT Level to use this command", "OK", "Cancel");
new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setbt [playerid] [level]")
&&
SendClientMessage(playerid, orange, "Function: Will set the Level of bT of the Specific Player");
new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(isnull(tmp2)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setbt [playerid] [level]")
&&
SendClientMessage(playerid, orange, "Function: Will set the Level of bT of the Specific Player");
level = strval(tmp2);

if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
if(PlayerInfo[player1][LoggedIn] == 1) {
if(level > 10 ) return SendClientMessage(playerid,0xFF0000AA,"ERROR: Max bT Level is 10");
if(level == PlayerInfo[player1][BT]) return SendClientMessage(playerid,0xFF0000AA,"ERROR: Player is already this bT level");
CMDMessageToAdmins(playerid,"SetbT");
CMDMessageToBT(playerid,"SetbT");
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);

if(level > 0) format(string,sizeof(string)," %s has set youre bT Status to level %d",adminname, level);
else format(string,sizeof(string)," %s has set youre bT Status to level %d",adminname, level);
SendClientMessage(player1,0x00FFFFAA,string);

if(level > PlayerInfo[player1][BT]) GameTextForPlayer(player1,"~g~bT LEVEL UP", 2000, 3);
else GameTextForPlayer(player1,"~r~bT LEVEL DOWN", 2000, 3);

format(string,sizeof(string),"You have made %s bT Level %d on %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,0x00FFFFAA,string);
format(string,sizeof(string),"%s has made %s bT Level %d on %d/%d/%d at %d:%d:%d",adminname, playername, level, day, month, year, hour, minute, second);
SaveToFile("btmembers",string);
dUserSetINT(PlayerName2(player1)).("bT",(level));
PlayerInfo[player1][BT] = level;
return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
} else return SendClientMessage(playerid,0xFF0000AA,"ERROR: Player must be registered and logged in to be set as a bT member");
} else return SendClientMessage(playerid, 0xFF0000AA, "Player is not connected");
} else return SendClientMessage(playerid,0xFF0000AA,"ERROR: You must be logged in to use this commands");
}
forward MessageToBT(color,const string[]);
public MessageToBT(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[i][BT] >= 1) {
if(PlayerInfo[i][LoggedIn] == 1) {
SendClientMessage(i, color, string); }
}
}
}
CMDMessageToBT(playerid,command[]) {
new string[128];
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"[bTMember] '%s' (Level: %d) | Command: %s",string,PlayerInfo[playerid][BT],command);
MessageToBT(blue,string);
return 1;
}

So, This IS the command now tell me
Reply
#7

Quote:
Originally Posted by priyanshu
Посмотреть сообщение
So, This IS the command now tell me
You need to pay attention to what I asked for... You've supplied the command, good job, but I also asked for other sections.

You've now given me the command I wanted in the first post, which is probably 1/2 of what I asked for in that post, then the subsequent post you told me it was saving, yet wasn't loading... So I asked for your load player function, and where it got called.


So again, read what's been put forward.


(Also, use tags, otherwise it just looks like a massive birdsnest and is unreadable.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)