How to store a players location in a string?
#1

I have a command for the people to call a mechanic, but I then want it to send all the mechanics a message like:

Caller: John Lawson
Location: %s
Situation: I need a tow.

How do I get the callers location and store it in a string so I can send it to the Mechanics?
Reply
#2

Use zonesystem filterscript if you want, https://sampforum.blast.hk/showthread.php?tid=161741

pawn Код:
new ZoneName[MAX_ZONE_NAME];
GetPlayer2DZone(callerid, ZoneName, MAX_ZONE_NAME);
new callerName[MAX_PLAYER_NAME]; GetPlayerName(callerid, callerName, MAX_PLAYER_NAME);
new string[128];
format(string, sizeof string, "Caller: %s, Location: %s", callerName, ZoneName);
for(new i = 0; i != MAX_PLAYERS; i++) if(/*if is player mechanic*/) SendClientMessage(i, 0xFFFFFFFF, string);
Reply
#3

Quote:
Originally Posted by erminpr0
Посмотреть сообщение
Use zonesystem filterscript if you want, https://sampforum.blast.hk/showthread.php?tid=161741

pawn Код:
new ZoneName[MAX_ZONE_NAME];
GetPlayer2DZone(callerid, ZoneName, MAX_ZONE_NAME);
new callerName[MAX_PLAYER_NAME]; GetPlayerName(callerid, callerName, MAX_PLAYER_NAME);
new string[128];
format(string, sizeof string, "Caller: %s, Location: %s", callerName, ZoneName);
for(new i = 0; i != MAX_PLAYERS; i++) if(/*if is player mechanic*/) SendClientMessage(i, 0xFFFFFFFF, string);
Thanks man, I appreciate it [+Rep for you ]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)