- 0
Problema cu playerid si player , comanda /me.
-
Similar Content
-
- 2 answers
- 389 views
-
- 0 answers
- 51 views
-
- 6 replies
- 333 views
-
- 4 replies
- 288 views
-
Cum adaug melodie pe timpul logarii? cand se logheaza playerii sa cante o anumita piesa
By Decisivul,
- 2 replies
- 234 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
DobreSus
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.
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.