Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public GameModeInit
- {
- SetTimer("OnPlayerInGangZone", Segundos(2), true); // Settimer ao iniciar o gm, true ficar repitindo
- return 1;
- }
- forward OnPlayerInGangZone();
- public OnPlayerInGangZone()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerInPlace(i, 2893.7405,834.1365, 2780.5613,1019.6943)) // Pos XMin, YMin, XMax, YMax
- {
- PlayerTextDrawSetString(i, TextZonaInfo[i][0], "Total de mercadorias");
- PlayerTextDrawShow(i, TextZonaInfo[i][0]);
- format(gStr, sizeof(gStr), "Utilitarios: %d > Loja de Skins: %d > Lanchonetes: %d", DOF2_GetInt("Distribuidora.ini", "Utilitarios"), DOF2_GetInt("Distribuidora.ini", "Skins"), DOF2_GetInt("Distribuidora.ini", "Lanches"));
- PlayerTextDrawSetString(i, TextZonaInfo[i][1], gStr);
- PlayerTextDrawShow(i, TextZonaInfo[i][1]);
- SendClientMessage(i, COR_ERRO, "tESTE");
- } else {
- PlayerTextDrawHide(i, TextZonaInfo[i][0]);
- PlayerTextDrawHide(i, TextZonaInfo[i][1]);
- }
- }
- return 1;
- }
- stock IsPlayerInPlace(playerid, Float:XMin, Float:YMin, Float:XMax, Float:YMax)
- {
- new RetValue = 0, Float:aX, Float:aY, Float:aZ ;
- GetPlayerPos(playerid, aX, aY, aZ);
- if(aX >= XMin && aY >= YMin && aX < XMax && aY < YMax)
- {
- RetValue = 1;
- }
- return RetValue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement