22.03.2012, 15:57
Quote:
|
Hmm Well !!!!. since people for sure around here will dump your noob question . and i know you are a brilliant person i tell ya what here the most secret that no one know to make a faction well
GO LEARN PAWN SCRIPTING IDIOT IT'S CALLED SCRIPTING YOU CAN'T TAKE A DAM PROGRAM TO MAKE A FACTION |
If you want a trucking faction, you can simply make a Faction area in a player enum if you have it, for example:
pawn Код:
enum pInfo
{
pFaction,
pRank,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
CMD:makeleader(playerid, params[])
{
new target, targetname[MAX_PLAYER_NAME], string[128], name[MAX_PLAYER_NAME], query[45], faction;
if(PlayerInfo[playerid][pAdmin] == 5 || PlayerInfo[playerid][pAdmin] == 6)
{
if (sscanf(params, "ui", target, faction)) return SendClientMessage(playerid, 0x787878AA, "Usage: /makeadmin <playerid> <faction>");
else if(!IsPlayerConnected(target)) return SendClientMessage(playerid, 0x787878AA,"SERVER: Invalid player ID");
name = GetName(playerid);
targetname = GetName(target);
PlayerInfo[target][pFaction] = faction;
PlayerInfo[target][pRank] = 6;
format(string, 128, "You have been made leader of faction slot %i by administrator %s.", PlayerInfo[target][pFaction], name);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, 128, "You've made %s the leader of faction slot %i", targetname, PlayerInfo[target][pFaction]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(query, sizeof(query), "UPDATE `playerdata` SET `Faction` = '%i' WHERE `user` = '%s'", PlayerInfo[target][pFaction],targetname);
mysql_query(query);
}
else
{
SendClientMessage(playerid, 0x787878AA, "You are not authorized to use that command!");
}
return 1;
}
Of course, this post would be humongous if I were to include a whole faction system for you, and It would take some time to make it, so I suggest figuring how to do it yourself.
TIP: Make sure to include details to what you want, others might bash about your question like the person above, if you haven't tried anything, you will never learn.
EDIT: Plus, I have some stocks and functions not included in this section that is part of the above code, so I suggest not just copying and pasting it in an attempt to make a faction.


