CMD:makeadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new targetid, level, string[70];
if(sscanf(params, "ui", targetid, level)) return SendClientMessage(playerid, 0xFFFFFF, "You aren't an admin");
if(level > 10 || level < 0) return SendClientMessage(playerid, 0xFFFFFF, "You can't do that");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFF, "Invalid Name/ID");
level = admin[targetid];
format(string, sizeof(string), "You have been promoted to level [%i] administration", level);
SendClientMessage(playerid, 0xFFFFFF, string);
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFFFF, "You aren't an admin");
return 1;
}
}
CMD:goto(playerid, params[])
{
if(IsPlayerAdmin(playerid) || admin[playerid] >= 1) // mhe kant kda mn el 2wl 5als, dumb-.- la2a kant admin(playerid) noob. not admin[playerid] ehda ba2a we bye
{
new targetid; new Float:x, Float:y, Float:z;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /goto <ID/Name>");
if(targetid == playerid) return SendClientMessage(playerid, COLOR_YELLOW, "You can't go to yourself");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_BLACK, "Invalid ID/Name");
GetPlayerPos(targetid, x, y, z);
SetPlayerPos(playerid, x+1, y, z);
SendClientMessage(playerid, COLOR_PINK, "You have been TelePorted");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_BLACK, "you aren't an admin");
}
return 1;
}
|
new admin[MAX_PLAYERS]; |
admin[targetid] = level;
admin[targetid] = level;