Police knows the robbing place - 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)
+--- Thread: Police knows the robbing place (
/showthread.php?tid=467865)
Police knows the robbing place -
LilBob - 05.10.2013
Hey,
I'm trying to do a script which will warn the police cops the place where the gangsta is robbing the business.
So a checkpoint will be shown on the minimap and a message will be displayed for cops.
The error is that the cops aren't prevented, no message and no checkpoints appeared.
Here is the script.
pawn Код:
for (i = MIN_PLAYERID; i < MAX_PLAYERS_CURRENT+1; i++)
{
if(PlayerInfo[i][pMember] == FACT_LSPD)
{
format(string, sizeof(string), "Position de la boutique qui se fait braquer : %f, %f, %f.", PlayerInfo[playerid][pOldX], PlayerInfo[playerid][pOldY], PlayerInfo[playerid][pOldZ]);
fact_sendMsg(FACT_LSPD, string, COLOR_ALERT);
SetPlayerCheckpoint(i, PlayerInfo[playerid][pOldX], PlayerInfo[playerid][pOldY], PlayerInfo[playerid][pOldZ]-10, 1);
gps_currentDest[i] = 5;
SendClientMessage(i, COLOR_ALERT, "[Alerte] Une boutique se fait braquer");
}
}
Thanks
Re : Police knows the robbing place -
LilBob - 05.10.2013
bump
Re : Police knows the robbing place -
LilBob - 06.10.2013
bump help please
Re: Police knows the robbing place -
NeTSk8 - 06.10.2013
Код:
for (i = 0; i < MAX_PLAYERS_CURRENT+1; i++)
{
if(PlayerInfo[i][pMember] == FACT_LSPD)
{
format(string, sizeof(string), "Position de la boutique qui se fait braquer : %f, %f, %f.", PlayerInfo[playerid][pOldX], PlayerInfo[playerid][pOldY], PlayerInfo[playerid][pOldZ]);
fact_sendMsg(FACT_LSPD, string, COLOR_ALERT);
SetPlayerCheckpoint(i, PlayerInfo[playerid][pOldX], PlayerInfo[playerid][pOldY], PlayerInfo[playerid][pOldZ]-10, 1);
gps_currentDest[i] = 5;
SendClientMessage(i, COLOR_ALERT, "[Alerte] Une boutique se fait braquer");
}
}
And also check if the LSPD Member has his /radio on and is on /duty.
I'm not sure if the fix I did will work but try.
Re : Police knows the robbing place -
LilBob - 06.10.2013
Ehm what have u changed ? ^^
Re: Police knows the robbing place -
NeTSk8 - 07.10.2013
I changed:
Код:
for (i = MIN_PLAYERID; i < MAX_PLAYERS_CURRENT+1; i++)
For this:
Код:
for (i = 0; i < MAX_PLAYERS_CURRENT+1; i++)