05.08.2012, 15:46
Right The script i use works from all includes , i have the class set up and have the /taxi Command working so the player shows red tot he taxi driver , but how would i make it so that the taxi driver gets paid once the passenger gets out the car, The file is an .inc file
Thanks in advance
Thanks in advance
pawn Код:
//
forward Taxi_CheckPlayers(playerid);
public Taxi_CheckPlayers(playerid)
{
// Scan through all players
for (new PlayerToCheck; PlayerToCheck < MAX_PLAYERS; PlayerToCheck++)
{
// check if this player is connected
if (IsPlayerConnected(PlayerToCheck))
{
//Check if that player needs assistance
if (APlayerData[PlayerToCheck][TaxiNeeded] == true)
SetPlayerMarkerForPlayer(playerid, PlayerToCheck, 0xFF0000FF); // Make that player red to the assistance-player
else
{
// Reset the playercolor based on the player's class
switch (APlayerData[PlayerToCheck][PlayerClass])
{
case ClassTruckDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassTruckDriver);
case ClassBusDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassBusDriver);
case ClassPilot: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPilot);
case ClassPolice: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPolice);
case ClassMafia: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMafia);
case ClassCourier: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassCourier);
case ClassAssistance: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassAssistance);
}
}
}
}
}