Robbery
#1

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
Reply
#2

Bump
Reply
#3

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(playeridnamesizeof(name));
CMD:Rob(bla bla)
{
    if (
IsPlayerInRangeOfPoint(playerid, -1955.7682306.024141.0471)) 
    {
        
SendClientMessage(playerid,0xFFFFFFFF,"%s has started robbing the Jefferson location!");
        
//robbing code here//
    
}
 
    return 
1;

Reply
#4

https://sampforum.blast.hk/showthread.php?tid=347053
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)