03.03.2012, 15:12
(
Последний раз редактировалось ArmyOps; 03.03.2012 в 16:17.
)
Found that i still have problem with that Havent tested it with other ppls but i think that it wount eaven get other ppls ID. Anyways here is the code:
I wount get this message if il type ex: "/makeadmin 2 1" and value looks like 0.00000, but i typed "1" for value
pawn Код:
CMD:makeadmin(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >= 1337)
{
if(IsPlayerConnected(playerid))
{
new playername, value;
if (sscanf(params, "ii", playername, value)) return SendClientMessage(playerid, -1, "USAGE: /makeadmin [Player-ID] [Faction-ID]");
{
if (playername != INVALID_PLAYER_ID)
{
new string[128];
PlayerInfo[playerid][pAdminLevel] = value;
format(string, sizeof(string), "Your admin level have been set to: %f", value);
SendClientMessage(playername, 0x00FF00FF, string);
}
}
}
else return SendClientMessage(playerid, -1, "This player is not connected!");
}
else return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
return 1;
}