Domnu.MC Posted June 22, 2018 Posted June 22, 2018 Salut, as vrea ca pe server sa nu fie chat global, adica daca un player scrie ceva, ce a scris el sa fie vazut doar de cei de langa el. Ma poate ajuta cineva??
Spongibubu Posted July 12, 2018 Posted July 12, 2018 Salut! Te voi ajuta eu. In primul rand, la public OnPlayerText(playerid, text[]) inloc de return 1; pui return 0; deoarece de acum noi vom formata textul. Unde ai stock-urile adaugi aceste stock-uri stock SendNearbyMessage(playerid, text[], color, Float:range) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); foreach(Player, i) { if(IsPlayerInRangeOfPoint(i, range, X, Y, Z)) { SendClientMessage(i, color, text); } } return 1; } stock GetName(playerid) { new PName[25]; GetPlayerName(playerid, PName, sizeof(PName); return PName; } Inloiesti public OnPlayerText(playerid, text[]) cu asta: public OnPlayerText(playerid, text[]) { new str[128]; format(str, sizeof(str), "%s says: %s", GetName(playerid), text); SendNearbyMessage(playerid, str, -1, 30.0); return 0; } Dupa cum vezi, este ceva chiar simplu. Poti schimba 30.0 cu ce distanta vrei tu, -1 cu ce culoare (aici e alb). Sper ca te-am ajutat, iar daca mai ai nevoie de ceva te rog sa-mi dai un PM sau reply la topic. Succes!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now