SA-MP Forums Archive
Clicking on another player = same player! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Clicking on another player = same player! (/showthread.php?tid=122263)



Clicking on another player = same player! - HydraX - 20.01.2010

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
  new tempstring[250];
  new plrIP[16];
    GetPlayerIp(playerid, plrIP, sizeof(plrIP));
  GetPlayerName(playerid,tempstring,sizeof(tempstring));
  format(tempstring,sizeof(tempstring),
    "%s's Stats\n\nKills:   %d\n\nDeaths:   %d\n\nScore:   %d\n\nJailed:   %d     [1 = Jailed, 0 = Not Jailed]\n\nAdmin:   %d     [0 = NonAdmin]\n\nMuted:   %d     [1 = Muted, 0 = Not Muted]\n\nMoney:   $%d.00\n\nIP: %s",tempstring,PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], PlayerInfo[playerid][Score], PlayerInfo[playerid][Jailed], PlayerInfo[playerid][Level], PlayerInfo[playerid][Muted], GetPlayerMoney(playerid), plrIP);
  ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Stats",tempstring,"OK","Close");
    return 1;
}
I'm not a pro so, dont say

AHH, YOU SUCK!! <-- Rarely happens..


Re: Clicking on another player = same player! - SlashPT - 20.01.2010

what is the real problem i dont understood


Re: Clicking on another player = same player! - HydraX - 20.01.2010

Quote:
Originally Posted by DarK_TeaM PT
what is the real problem i dont understood
When I click another persons stats, In TAB... It shows only my stats instead of the other players.


Re: Clicking on another player = same player! - SlashPT - 20.01.2010

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
  new tempstring[250];
  new plrIP[16];
GetPlayerIp(clickedplayerid, plrIP, sizeof(plrIP));
  GetPlayerName(clickedplayerid,tempstring,sizeof(tempstring));
  format(tempstring,sizeof(tempstring),
"%s's Stats\n\nKills:   %d\n\nDeaths:   %d\n\nScore:   %d\n\nJailed:   %d     [1 = Jailed, 0 = Not Jailed]\n\nAdmin:   %d     [0 = NonAdmin]\n\nMuted:   %d     [1 = Muted, 0 = Not Muted]\n\nMoney:   $%d.00\n\nIP: %s",tempstring,PlayerInfo[clickedplayerid][Kills], PlayerInfo[clickedplayerid][Deaths], PlayerInfo[clickedplayerid][Score], PlayerInfo[clickedplayerid][Jailed], PlayerInfo[clickedplayerid][Level], PlayerInfo[clickedplayerid][Muted], GetPlayerMoney(clickedplayerid), plrIP);
  ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Stats",tempstring,"OK","Close");
  return 1;
}
untested hope it work


Re: Clicking on another player = same player! - HydraX - 20.01.2010

Quote:
Originally Posted by DarK_TeaM PT
pawn Код:
...
untested hope it work
Thanks, But I'm getting that long line after substutions error, I hoep I get that fixed soon.


Re: Clicking on another player = same player! - SlashPT - 20.01.2010

its because the line is too long put it a bit smaller hehe


Re: Clicking on another player = same player! - HydraX - 20.01.2010

Quote:
Originally Posted by DarK_TeaM PT
its because the line is too long put it a bit smaller hehe
:P,

The problem is I can't make it smaller.


Re: Clicking on another player = same player! - SlashPT - 20.01.2010

its easy copy same as im going to put down here
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
  new tempstring[250];
  new plrIP[16];
GetPlayerIp(clickedplayerid, plrIP, sizeof(plrIP));
  GetPlayerName(clickedplayerid,tempstring,sizeof(tempstring));
  format(tempstring,sizeof(tempstring),
"%s's Stats\n\nKills:   %d\n\nDeaths:   %d\n\nScore:   %d\n\nJailed:   %d     [1 = Jailed, 0 = Not Jailed]\n\nAdmin:   %d     [0 = NonAdmin]\n\nMuted:   %d     [1 = Muted, 0 = Not Muted]\n\nMoney:   $%d.00\n\nIP: %s"
,tempstring,PlayerInfo[clickedplayerid][Kills], PlayerInfo[clickedplayerid][Deaths], PlayerInfo[clickedplayerid][Score], PlayerInfo[clickedplayerid][Jailed], PlayerInfo[clickedplayerid][Level], PlayerInfo[clickedplayerid][Muted], GetPlayerMoney(clickedplayerid), plrIP);
  ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Stats",tempstring,"OK","Close");
  return 1;
}



Re: Clicking on another player = same player! - HydraX - 20.01.2010

Quote:
Originally Posted by DarK_TeaM PT
its easy copy same as im going to put down here
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
  new tempstring[250];
  new plrIP[16];
GetPlayerIp(clickedplayerid, plrIP, sizeof(plrIP));
  GetPlayerName(clickedplayerid,tempstring,sizeof(tempstring));
  format(tempstring,sizeof(tempstring),
"%s's Stats\n\nKills:   %d\n\nDeaths:   %d\n\nScore:   %d\n\nJailed:   %d     [1 = Jailed, 0 = Not Jailed]\n\nAdmin:   %d     [0 = NonAdmin]\n\nMuted:   %d     [1 = Muted, 0 = Not Muted]\n\nMoney:   $%d.00\n\nIP: %s"
,tempstring,PlayerInfo[clickedplayerid][Kills], PlayerInfo[clickedplayerid][Deaths], PlayerInfo[clickedplayerid][Score], PlayerInfo[clickedplayerid][Jailed], PlayerInfo[clickedplayerid][Level], PlayerInfo[clickedplayerid][Muted], GetPlayerMoney(clickedplayerid), plrIP);
  ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Stats",tempstring,"OK","Close");
  return 1;
}
Fixed it a while ago. Thanks though


Re: Clicking on another player = same player! - Miki_Milan - 26.02.2010

Help please


(1589 -- 1591) : error 017: undefined symbol "Kills"