- 0
Problema cu playerid si player , comanda /me.
-
Similar Content
-
- 3 answers
- 1.097 views
-
- 1 answer
- 381 views
-
- 8 answers
- 818 views
-
Problema billboards (la expirarea billboard-ului nu seteaza variabila Billboard 0 jucatorului offline)
By cstef4n,
- 2 answers
- 606 views
-
- 7 answers
- 2.926 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
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