Admin Script.
#2

pawn Код:
COMMAND:makeadmin(playerid, params[])
{
 new targetid;
 if(sscanf(params, "u", targetid))
  return SendClientMessage(playerid, COLOR_GREY, "USAGE: /makeadmin [playerid/name]");
 if(!IsPlayerConnected(targetid)))
 return SendClientMessage(playerid, COLOR_LIGHTRED, "Invalid name/id!");
 //
 SendClientMessageToAll(WHITE, "Welcome an administrator to the team!");
 gPlayerInfo[targetid][PLAYER_LEVEL] = 1; //(this being the admin level number)
 SendClientMessage(targetid, COLOR_WHITE, "Your now a server administrator");
 return 1;
}
And just create a save function so when the player disconnects all the dini_IntSet's go under that save function and you'd just get the info from the gPlayerInfo variables.
Reply


Messages In This Thread
Admin Script. - by iGetty - 07.06.2011, 17:32
Re: Admin Script. - by Steven82 - 07.06.2011, 17:38
Re: Admin Script. - by randomkid88 - 07.06.2011, 17:42
Re: Admin Script. - by iGetty - 07.06.2011, 17:43
Re: Admin Script. - by Steven82 - 07.06.2011, 17:45
Re: Admin Script. - by iGetty - 07.06.2011, 17:52
Re: Admin Script. - by Steven82 - 07.06.2011, 18:03

Forum Jump:


Users browsing this thread: 2 Guest(s)