1)
Create an command that will set the players stats to "Mafia'
for an example -
pawn Код:
CMD:setmafia(playerid, params[]) {
new id;
new string[128];
if(PlayerInfo[playerid][pAdmin] < 5 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[ADMIN] - You're not a high enough level to use this command!");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "[USAGE] - /setmafia [ID]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "[ERROR] - Player not found!");
if(PlayerInfo[id][pMafia] == 1) return SendClientMessage(playerid, COLOR_RED, "[ERROR] - Player is already a mafia member!");
new pname[MAX_PLAYER_NAME],recievername[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(id,recievername,sizeof(recievername));
GameTextForPlayer(id, "~g~HIRED", 2500, 1);
PlayerInfo[id][pMafia] = 1;
format(string, sizeof(string), "* Admin %s[%d] has set %s[%d] as a mafia member", pname, playerid, recievername, id);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
2)
You can do that with
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
But if I'm not mistaken, then you need to use special "new mafiacar 1 = CreateVehicle ...." etc.
3)
pawn Код:
public OnPlayerSpawn(playerid)
{
if(gClass[playerid] == MAFIA)//or gTeam[playerid] ...
{
SetPlayerSkin(playerid, SkinId)
}
return 1;
}
THESE WERE NOT TESTED, THEY WERE JUST EXAMPLES.