Robbery - 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: Robbery (
/showthread.php?tid=634018)
Robbery -
Despacito - 11.05.2017
I'm making a dynamic robbery system and i made this:
pawn Код:
new const stock Float:robberyPlaces[][10] = {
{-1955.7682, 306.0241, 41.0471},
{-2051.8413, 86.1440, 28.3977},
{-2141.5591, -256.7738, 40.7195},
{379.6270,-8.7878,1001.8516},
{216.6623,-100.1878,1005.2578},
{379.7124,-59.6829,1001.5078},
{-2031.0654,-117.4350,1035.1719},
{365.1240,-6.7055,1001.8516},
{-201.7283,-7.8537,1002.2734},
{296.7915,-35.3443,1001.5156},
{203.6611,-40.2956,1001.8047}
};
Everytime a player is at that coordinate, he can do /rob to start robbing that place.
I have a question: How to add a robbery name for each coordinate to show it in rob cmd?
Currently i have: "Playername has started robbing at zone name) (I have a zone system).
I want to make it like:
"playername has started robbing at Ammunation".
Thanks
Re: Robbery -
Despacito - 12.05.2017
Bump
Re: Robbery -
aoky - 12.05.2017
Let's just say -1955.7682, 306.0241, 41.0471 = Jefferson.
You could use IsPlayerInRangeOfPoint so like this:
(Make sure to create a new X to find the players name
PHP код:
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
CMD:Rob(bla bla)
{
if (IsPlayerInRangeOfPoint(playerid, -1955.7682, 306.0241, 41.0471))
{
SendClientMessage(playerid,0xFFFFFFFF,"%s has started robbing the Jefferson location!");
//robbing code here//
}
return 1;
}
Re: Robbery -
Sew_Sumi - 13.05.2017
https://sampforum.blast.hk/showthread.php?tid=347053