30.05.2010, 18:48
Hey guys,yesterday I've asked you a question about the textdraws thingy,well,that problem solved.
But there's another one popped out now.
Well i have this:
Well,now the problem is that,it only shows id 0's stats,for example if I'm id 0,and I'll hold the submission key,
I'll see all of the correct information,but if other players will hold the submission key,they will also see my stats.
Any help appreciated.
But there's another one popped out now.
Well i have this:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (HOLDING(KEY_SUBMISSION))
{
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw5);
TextDrawShowForPlayer(playerid,Textdraw6);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8);
TextDrawShowForPlayer(playerid,Textdraw9);
GetPlayerName(playerid,N,sizeof(N));
format(Str,sizeof(Str),"Name: %s",N);
TextDrawSetString(Textdraw0,Str);
new IP[60];
GetPlayerIp(playerid,IP,sizeof(IP));
format(Str,sizeof(Str),"IP : %s",IP);
TextDrawSetString(Textdraw1,Str);
SetTimer("Fuck",1,1);
}
if (RELEASED( KEY_SUBMISSION ))
{
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8);
TextDrawHideForPlayer(playerid,Textdraw9);
KillTimer(Fuck(playerid));
}
return 1;
}
pawn Код:
forward Fuck(playerid);
public Fuck(playerid)
{
new N[60];
new Str[60];
new Float:x,Float:y,Float:z,Float:a,Float:c,Float:h,Float:ar,Float:s;
GetPlayerPos(playerid,x,y,z);
format(Str,sizeof(Str),"X: %f",x);
TextDrawSetString(Textdraw2,Str);
format(Str,sizeof(Str),"Y: %f",y);
TextDrawSetString(Textdraw3,Str);
format(Str,sizeof(Str),"Z: %f",z);
TextDrawSetString(Textdraw4,Str);
GetPlayerFacingAngle(playerid,a);
format(Str,sizeof(Str),"Angle : %f",a);
TextDrawSetString(Textdraw5,Str);
c = GetPlayerMoney(playerid);
format(Str,sizeof(Str),"Money : %d$",c);
TextDrawSetString(Textdraw6,Str);
GetPlayerHealth(playerid,h);
format(Str,sizeof(Str),"Health :%.0f",h);
TextDrawSetString(Textdraw7,Str);
GetPlayerArmour(playerid,ar);
format(Str,sizeof(Str),"Armour : %.0f",ar);
TextDrawSetString(Textdraw8,Str);
s = GetPlayerScore(playerid);
format(Str,sizeof(Str),"Kills: %d",s);
TextDrawSetString(Textdraw9,Str);
}
I'll see all of the correct information,but if other players will hold the submission key,they will also see my stats.
Any help appreciated.