17.07.2015, 09:57
PHP код:
enum aInfo
{
sLevel
}
public OnPlayerDisconnect(playerid, reason)
{
dini_IntSet(file, "SKIN", AccountInfo[playerid][sLevel]);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(gTeam[playerid] == YouTeamNameHere)
if(AccountInfo[playerid][sLevel] < 1)
{
GameTextForPlayer(playerid, "~r~YOU NEED PERMISSION OF ADMIN", 3000, 3);
return false;
}
AccountInfo[playerid][sLevel] = dini_Int(file, "SKIN");
PHP код:
dcmd_givepermission(playerid, params[])
{
if(AccountInfo[playerid][scLevel] < 1) SendClientMessage(playerid, COLOR_RED, "Invalid Command! Use /cmds To See The General Commands.");
else
{
new ID, level;
if(sscanf(params, "ii", ID, level)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givepermission [playerid] (1) For Promoting (0) For Demoting]");
else if(ID == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Player is Not Connected.");
else
{
AccountInfo[ID][sLevel] = level;
SendClientMessage(ID, -1, "{00FF00}Congratulations {CC99FF}You Are {FFCC00}Promoted {99FF33}To {33CCFF}Use That Skin");
SendClientMessage(playerid,COLOR_GREEN,"You Have Gave That Player To Skin Permission!");
}
}
return 1;
}
Hope You UnderStand