05.09.2016, 01:31
tenho esse codigo
queria quer se o veado fosse o ultimo a ser matado aparecer uma mensagem que "Vocк matou todos os veados use /cacar novamente", como faзo isso?
Quote:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { new Float ![]() new string[128]; if(hittype == 3) { if(weaponid == 33) { if(IsValidObject(hitid)) { for(new a; a < sizeof(veados); ++a) { if(hitid == veados[a][playerid]) { GetObjectPos(veados[a][playerid], x, y, z); new Float: distancia = GetPlayerDistanceFromPoint(playerid, x, y, z); format(string, sizeof(string), "| CAЗA | Vocк abateu seu alvo а %0.00f metros e recebeu $%0.00f pela venda da caзa!", distancia*1, distancia*2-1); SendClientMessage(playerid, -1, string); GivePlayerMoney(playerid, floatround(distancia * 2)); DestroyObject(hitid); break; } } } } } return 1; } |