Some questions
#1

Hi guys. I need some help. I am beginning a new DM script, but I have not installed GTA SA in my PC. So, first of all I need the exact coordinates of:

LS Hospital (All Saints)
Ganton Gym
LSPD

Now, for the /ban cmd I have this:

pawn Код:
CMD:ban(playerid, params[]) {
    new id, r;
    if(sscanf(params, "uz", id, r)) {
        if(IsPlayerAdmin(playerid)) {
            if(id != INVALID_PLAYER_ID) {
                new name[MAX_PLAYER_NAME], str[128];
                GetPlayerName(id, name, MAX_PLAYER_NAME);
                format(str, sizeof(str), "An Admin has banned %s. Reason: %s", name, r);
                BanEx(id, str);
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Error: Player not found");
        }
        else return SendClientMessage(playerid, COLOR_BRIGHTRED, "You have no acces to this command");
    }
    else return SendClientMessage(playerid, COLOR_ORANGE, "Syntax Error: /kick [playerid/partofname] [reason (optional)]");
    return 1;
}
Should this work? :

pawn Код:
format(str, sizeof(str), "An Admin has banned %s. Reason: %s", name, r);
BanEx(id, str);
Reply
#2

You need to make 'r' a string, right now it's an integer, you're trying to unformat your command parameters in to 'r' as a string, but you can't as you declared it as an integer. Change 'new id, r;' to 'new id, r[64];' (or another size, eg: [128]).

Anyhow - you should just send the reason to BanEx(), so 'BanEx(id, r);' because BanEx()'s second parameter is expecting a reason, not to state the obvious (that an admin banned Y).
Reply
#3

Okay, i'll try
Reply
#4

So, can I use this?

pawn Код:
format(str, sizeof(str), "An Admin has banned %s. Reason: %s", name, r);
SendClientMessageToAll(COLOR_LIGHTLUE, str);
BanEx(id, r);
Reply
#5

Yes, you can.
Reply
#6

Okay, now for the coordinates, can someone help me?
Reply
#7

Do you need the coordinates at the door entrances, or you need them like on the middle of the buildings?

Edit: Anyways, here are the coordinates. These coordinates to to the entrance doors:
pawn Код:
2229.5852,-1721.5590,13.5641 // Ganton gym
1172.5934,-1325.3562,15.4033 // All Saints hospital.
1554.9225,-1675.6625,16.1953 // LSPD
Reply
#8

Thanks bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)