04.07.2018, 16:45
PHP код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(taxi[i]==1 && GetPlayerState(playerid) == PLAYER_STATE_PASSENGER && i != playerid)
{
SetPlayerMapIcon(i, 0, fX, fY, fZ, 0, 0xFF0000FF, MAPICON_GLOBAL);
if(IsPlayerInRangeOfPoint(i, 50, fX, fY, fZ))
{
RemovePlayerMapIcon(i, 0);
SendClientMessage(playerid, -1, "you have arrived");
GameTextForPlayer(i, "you have arrived", 1000, 0);
TextDrawShowForPlayer(i, textdraw_payout);
TextDrawShowForPlayer(i, textdraw_taxipayout);
GivePlayerMoney(i, 3000);
GivePlayerMoney(, -100);
}
}
}
return 1;
}
PHP код:
CMD:taxi(playerid, params[])
{
new vmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
if(vmodel != 420 && vmodel != 438) return SendClientMessage(playerid, 0xFF0000FF, "You are not in a Taxi!");
GameTextForPlayer(playerid, "TAXI", 6000, 4);
taxi[playerid] = 1;
PlayerTextDrawShow(playerid, textdraw_taxicustomer[playerid]);
return 1;
}
Any idea?