how do i make a simple /fine and /arrest command for police class?
#1

hey guys,
i have now made 3 classes(dealer,police, freeroam) and with some help of other players in this forum it is very nice now but now i want to make for the police class a /fine and /arrest command... but i have no idea how to make this... so can pls anyone tell me how to do this or give me a tutorial about how to make this?(if there is a tut for it, i already searched but couldnt find 1)

can anyone pls help me?

greets niels

come on can anyone help me? pls if you only have a /arrest cmd or a /fine cmd then pls just place it here or pls tell me how to make this if you know...
Reply
#2

What are using as a cmd processor? Zcmd or strcmp?
Reply
#3

im using zcmd
Reply
#4

pawn Код:
CMD:fine(playerid, params[]) //this is the new syntax for zcmd
    {
    new level, id,fine;
    if(sscanf(params, "udd", id, level,fine)) //changed from 'udd' to 'udd'
    {
        if(gTeam[playerid] ==  TEAM_POLICE) // Change according to your class definition
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fine [playerid] [money]");
        }
        if(gTeam[playerid] !=  TEAM_POLICE) // Change according to your class definition
        {
            SendClientMessage(playerid, COLOR_WHITE, "You are not a part of Police force!");
        }
    }
    else
    {
        if(PlayerInfo[playerid][pAdmin] >= 2)
        { // no need for tmp here, you already got 'level' (skinid?) by sscanf
            new str[64];
            format(str, sizeof(str), "Admin: %s has fined %s with %d$", PlayerName(playerid),PlayerName(id),money);
            SendClientMessageToAll(COLOR_WHITE,str)
            GivePlayerMoney(id,-money); // Change this to your Money given or PlayerInfo Cash ++
        }
    }
    return 1;
    }

    // Add this anywhere in the GM or bottom
    stock PlayerName(playerid)
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        return name;
    }
Reply
#5

hmm thnx but it isnt what i wanted... i wanted a fine cmd which u just can use /fine and then it checks if the player is near a wanted player and if he isnt then it says: ERROR: there is no wanted player in range to fine;
and if there is a wanted player in range then he fines him and the wanted player gets $500 reduced for each wanted star he has and the police gets the amount of cash the wanted player loses... i hope you guys understand this and else pls tell me then i will give better explaination... and can pls anyone make this for me?
Reply
#6

do it yourself or learn to script ?

IsPlayerInRangeOfPoint
GetPlayerPos
IsPlayerConnected
Reply
#7

eehm i can script very well i just dont know how to make this kind of things XD never scripted that cmds before... so i hoped someone could teach me or give me a link with a tut...
Reply
#8

Dude you always bump your threads within 48 hours... This is bannable.. And twice. I saw tons of your topics about
stuf you couldn't make..
Reply
#9

well sorry but eehm i am not a very good professional i still have to learn things so sorry if you dont like it but i just need help
Reply
#10

Quote:
Originally Posted by niels44
Посмотреть сообщение
hmm thnx but it isnt what i wanted... i wanted a fine cmd which u just can use /fine and then it checks if the player is near a wanted player and if he isnt then it says: ERROR: there is no wanted player in range to fine;
and if there is a wanted player in range then he fines him and the wanted player gets $500 reduced for each wanted star he has and the police gets the amount of cash the wanted player loses... i hope you guys understand this and else pls tell me then i will give better explaination... and can pls anyone make this for me?
We all do understand and we ca code every single thing you said. But the problem is we all will code it in different style as well as we will use different function's for different stuff. So it is required to see your script functios. The function which tells the server that the player is a Criminal. Have you defined something like new PlayerCriminal[MAX_PLAYERS]; and you do somewhere PlayerCriminal[player] = 1; and so on. Do you got some function like that which makes a playerid Criminal and not civilian!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)