04.07.2018, 17:59
I did this, could someone correct my code, it doesn't seem to work :/
//EDIT added Streamer_Update(i); nothing happened
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);
taxiarea = CreateDynamicSphere(fX, fY, fZ, 10, 0, 0, i);
Streamer_Update(i);
}
}
return 1;
}
public OnPlayerEnterDynamicArea(playerid, areaid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(areaid == taxiarea && taxi[playerid]==1 && GetPlayerState(i) == PLAYER_STATE_PASSENGER)
{
RemovePlayerMapIcon(playerid, 0);
SendClientMessage(i, -1, "you have arrived");
GameTextForPlayer(playerid, "you have arrived", 1000, 0);
TextDrawShowForPlayer(playerid, textdraw_payout);
TextDrawShowForPlayer(playerid, textdraw_taxipayout);
GivePlayerMoney(playerid, 3000);
GivePlayerMoney(i, -100);
}
}
return 1;
}