24.02.2012, 00:36
Thank you for your reply but I already managed to fix it :P.. I fixed it like this:
Best regards,
Jesse
pawn Код:
*under includes*
new answer;
// /setadmin command.
CMD:setadmin(playerid, params[])
{
if (IsPlayerAdmin(playerid) == 1)
{
if (isnull(params)) return SendClientMessage(playerid, KLEUR_VOORB, "USAGE: /setadmin [ID] [level]");
{
if(!sscanf(params, "dd", targetplayerid, isadmin[answer]))
if(isadmin[answer] > 6 || isadmin[answer] < 0) return SendClientMessage(playerid, KLEUR_VOORB, "Level: 0-6");
if(isadmin[answer] == 0)
{
isadmin[targetplayerid] = 0;
new maker[110];
format(maker, sizeof(maker), "You have just removed %s from the Administration team.", pNaam(targetplayerid));
SendClientMessage(playerid, KLEUR_BLAUW, maker);
new krijger[110];
format(krijger, sizeof(krijger), "Administrator %s has just removed you from the Administration team.", pNaam(playerid));
SendClientMessage(targetplayerid, KLEUR_BLAUW, krijger);
}
if(isadmin[answer] == 1)
{
isadmin[targetplayerid] = 1;
new maker[110];
format(maker, sizeof(maker), "You have just added %s to the Administration team.", pNaam(targetplayerid));
SendClientMessage(playerid, KLEUR_BLAUW, maker);
new krijger[110];
format(krijger, sizeof(krijger), "Administrator %s has just added you to the Administration team.", pNaam(playerid));
SendClientMessage(targetplayerid, KLEUR_BLAUW, krijger);
}
}
return 1;
}
return 1;
}
Jesse