SA-MP Forums Archive
Need Help with /calltaxi - 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: Need Help with /calltaxi (/showthread.php?tid=328512)



Need Help with /calltaxi - GAMER_PS2 - 25.03.2012

Guys I Made A /calltaxi command.In which You need to /calltaxi yourcurrentposition.Then in that command i added a DynamicCP.but i want that if he do /calltaxi the old checkpoint would be deleted.
+
I want to say that the dynamic cp can be seen only by taxi players
Can Some One Help ME its With ZCMD and sscanf


Re: Need Help with /calltaxi - Reklez - 25.03.2012

Create a stock function for Taxi Drivers like this

pawn Код:
stock MessageToTaxiDriver(playerid, color, const string[])
{
   for(new i = 0; i < MAX_PLAYERS; i++) {
       if(IsPlayerConnected(i) == 1) {
           if(pInfo[playerid][JobMember] == 1) {
               SendClientMessage(playerid, color, string);
               SetPlayerMarkerForPlayer(playerid, i, COLOR_RED);
           }
       }
   }
   return 1;
}
that is example only.


Re: Need Help with /calltaxi - GAMER_PS2 - 25.03.2012

I know and i created that too Thank You


Re: Need Help with /calltaxi - Joshb93 - 25.03.2012

Quote:
Originally Posted by Reklez
Посмотреть сообщение
Create a stock function for Taxi Drivers like this

pawn Код:
stock MessageToTaxiDriver(playerid, color, const string[])
{
   for(new i = 0; i < MAX_PLAYERS; i++) {
       if(IsPlayerConnected(i) == 1) {
           if(pInfo[playerid][JobMember] == 1) {
               SendClientMessage(playerid, color, string);
               SetPlayerMarkerForPlayer(playerid, i, COLOR_RED);
           }
       }
   }
   return 1;
}
that is example only.
This would fail.

Reason: It would set the marker for taxi drivers, given that variable is the taxi job, but it would set a marker for every taxi driver connected.

You need to make a variable, so that if they are calling a taxi, it sets the checkpoint for the caller, not the taxi drivers.


Re : Need Help with /calltaxi - Ultrascipter - 25.03.2012

Exact code:

Код:
stock MessageToTaxiDriver(playerid, color, const string[])
{
   for(new i = 0; i < MAX_PLAYERS; i++) {
       if(IsPlayerConnected(i) == 1) {
           if(pInfo[i][JobMember] == 1) {
               SendClientMessage(i, color, string);
               SetPlayerMarkerForPlayer(i, playerid, 0xFFFFAA);
           }
       }
   }
   return 1;
}