#1

guys first i want some one to help in and tell :
1- how i make a new gang or skill like army or cia i want to call it Mafia and only admin can give it to players
2- how to make private cars for the skill only it can use it
3- how to make special skin for it
Reply
#2

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.
Reply
#3

that didn't work for me и_и im using dcmd_(cmd) and its with zcmd and it shows me a lot of errors can you correct it please
Reply
#4

No One
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)