Need Help with /calltaxi
#1

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

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.
Reply
#3

I know and i created that too Thank You
Reply
#4

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.
Reply
#5

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)