20.06.2010, 19:27
I have made a faction/organization. It works almost 100%. The problem is that when I set myself as a leader of FBI, and relog, I can still enter the FBI vehicles, I can still promote and all that. But i dont get my weapon and my name is still white (while it shuld be blue)
// OnPlayerDisconnect
// OnPlayerSpawn
// The command that makes them the leader
//Login
//Register
// OnPlayerDisconnect
Код:
dini_IntSet(file,"FBIlevel", FBI[playerid]);
// OnPlayerSpawn
Код:
if(FBI[playerid] == 1) { SetPlayerColor(playerid,COLOUR_BLUE); GivePlayerWeapon(playerid, 29, 750); GivePlayerWeapon(playerid, 34, 200); }
// The command that makes them the leader
Код:
dcmd_leadfbi(playerid,params[]) { new pid; if(admin[playerid] <= 3) return 0; if(sscanf(params,"u",pid)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /leadfbi [playerid]"); else if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, 0xFF0000FF, "There is no player with that id online"); { SendClientMessage(pid, 0xFFFFFFFF, "An admin has set you as leader of FBI"); GameTextForPlayer(pid, "~b~You are now leader of FBI", 3000, 0); FBI[pid] = 3; SetPlayerColor(pid, 0x003DF5AA); return 1; } }
Код:
FBI[playerid] = dini_Int(file,"FBIlevel");
Код:
dini_IntSet(file,"FBIlevel",0 );