Jump to content

DobreSus

Membru
  • Posts

    1
  • Joined

  • Last visited

Everything posted by DobreSus

  1. Salut ! Am urmatorul script : CMD:me(playerid,text[]) { if(sscanf(text,"s")==0) { new action[128] = ">PLAYER_NAME ACTION"; strreplace(action,"PLAYER_NAME",player_name); strreplace(action,"ACTION",text); SendClientMessage(playerid,COLOR_PURPLE,action); for (new player=0;player<MAX_PLAYERS;player++) { new Float:x, Float:y, Float:z; GetPlayerPos(player,x,y,z); if(playerid!=player) { if(GetPlayerDistanceFromPoint(player,x,y,z)<6) SendClientMessage(player,COLOR_PURPLE,action); } } return 1; } else return 0; } Ce vreau eu sa faca : daca jucatorul X da comanda "/me fumeaza o tigara." sa apara in chat ">X fumeaza o tigara.". Asta intr-un range calculat cu fiecare player prim structura for. Totusi, am testat pe LAN cu doua calculatoare si sunt 2 mari probleme : Mesajul apare global, indiferent de distanta dintre cei doi playeri. Daca am jucatorii X si Y, si Y da comanda "/me", apare ca si cum a dat-o X.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.