stock IsPlayerOG(playerid)
{
IsPlayerOG(playerid)
}
CMD:og(playerid, params[])
{
new
glevel[32], id;
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(sscanf(params, "us[32]", id, glevel)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /og [id] [gangster level]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
new
str[128];
format(str, 128, "System: %s [ID %d] has set %s [ID %d] gangsterlevel to %s.", PlayerName(playerid), playerid, PlayerName(id), id, glevel);
SendClientMessage(playerid, COLOR_YELLOW, str);
if(INI_Open(getINI(playerid)))
{
INI_WriteString("GangsterLvl", glevel);
new
pts = INI_ReadInt("RespectPts");
if(pts <= 90)
{
INI_WriteInt("RespectPts", pts + 10);
}
else
{
INI_WriteInt("RespectPts", 100);
}
INI_Save();
INI_Close();
}
return 1;
}
else return SendClientMessage(playerid,COLOR_RED," You are not allowed to use this command!");
}
new bool:IsPlayerOG[MAX_PLAYERS]
if(IsPlayerOG[playierid])
No man, I want it as stock!
'Cause I will need it later for my businesses! For example: if(IsPlayerOG) then the business can be bought |
new bool:IsPlayerOG[MAX_PLAYERS];
CMD:buybusiness(playerid,params[])
{
if(IsPlayerOG[playerid])
{
//Buy business thinghy
}
return 1;
}
Ok guys, now we got a problem!
I want some businesses with IsPlayerOG, and some businesses without it! What now?? |
CMD:buybusiness(playerid,params[] ) {
if ( IsPlayerInRangeOfPoint( playerid, 2.0, ogbusinesspos ) ) // og only buz
{
if ( !isplayerog[ playerid ] ) return SendClientMessage( playerid, -1, "building for og's only." );
}
// buybusiness thingy
return 1;
}