Some questions - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some questions (
/showthread.php?tid=247934)
Some questions -
Rivera - 11.04.2011
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);
Re: Some questions -
Calgon - 11.04.2011
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).
Re: Some questions -
Rivera - 11.04.2011
Okay, i'll try
Re: Some questions -
Rivera - 11.04.2011
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);
Re: Some questions -
Calgon - 11.04.2011
Yes, you can.
Re: Some questions -
Rivera - 11.04.2011
Okay, now for the coordinates, can someone help me?
Re: Some questions -
Prumpuz - 11.04.2011
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
Re: Some questions -
Rivera - 05.05.2011
Thanks bro