Currently having a problem. - 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: Currently having a problem. (
/showthread.php?tid=125714)
Currently having a problem. -
Mystique - 05.02.2010
Hello, I have a problem with this one.
Код:
dcmd_m(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
new Vehicleid;
Vehicleid = GetPlayerVehicleID(playerid);
if(Vehicleid == police2)
{
new
output[128],
pName[MAX_PLAYER_NAME],
str[157];
if(sscanf(params, "m", output)) SendClientMessage(playerid, COLOR_RED, "Usage: /m [message]");
else
{
GetPlayerName(playerid, pName, sizeof(pName));
format(str, sizeof(str), " MEGAPHONE: Police Officer %s: %s!!!", pName, output);
ProxDetector(100.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "This vehicle is not equiped with a megaphone.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are currently not in any vehicle.");
}
return 1;
}
But for me it shows "MEGAPHONE: Police Officer %s: %s!!!" only.
Please help.
Re: Currently having a problem. -
Mystique - 06.02.2010
Sorry for bumping this thread but it seems like no one sees it.
Re: Currently having a problem. -
Flake. - 06.02.2010
so your saying it only shows for you? and not for everyone? just change it to GameTextForAll or w/e
Re: Currently having a problem. -
Mystique - 06.02.2010
No, I mean this shows for everyone but the thing im writing after /m doesn't show up. Like if I write /m stop it only says
"MEGAPHONE: Police Officer Richard_Wright:!!!"
Re: Currently having a problem. -
MadeMan - 06.02.2010
pawn Код:
if(sscanf(params, "m", output))
change it to
pawn Код:
if(sscanf(params, "s", output))
Re: Currently having a problem. -
Mystique - 06.02.2010
Does not work.
Re: Currently having a problem. -
¤Adas¤ - 06.02.2010
Eh, what is proxydetector? :O
Re: Currently having a problem. -
Mystique - 06.02.2010
It makes it ranged, but that's not the problem. I want it to show MEGAPHONE: Police officer Richard Wright: stop!!! when typing /m stop
Re: Currently having a problem. -
Mystique - 07.02.2010
Bump.
Re: Currently having a problem. -
mansonh - 07.02.2010
Where is your actual sendclientmessage command, it doesn't appear to be in there, you just run proxdetector then end.