need little help with TAB - 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)
+--- Thread: need little help with TAB (
/showthread.php?tid=420662)
need little help with TAB -
ignas1125 - 06.03.2013
Hi i need little help with tab,can make the script that when press TAB see names and if player vip see [VIP]Name

thank if you gonna help
Re: need little help with TAB -
[MG]Dimi - 06.03.2013
You would need to use SetPlayerName but everyone would see name like that above VIPs' head.
Re: need little help with TAB -
shady001 - 06.03.2013
pawn Код:
//global
new playername[MAX_PLAYER_NAME][MAX_PLAYERS];
public OnPlayerLogin(playerid,password)
{
//after loading PlayerData
if(PlayerInfo[playerid][pVip] >= 1)
{
new name[MAX_PLAYER_NAME];
new vipname[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(vipname,24,"[VIP]%s",name);
strmid(playername[playerid],name,0,24,24);
SetPlayerName(playerid,vipname);
}
}
public OnPlayerDisconnect(playerid)
{
SetPlayerName(playerid,playername[playerid]);
}
Just an example , i hope you understand.
Re: need little help with TAB -
ignas1125 - 06.03.2013
shady001 i getting this
(2535) : warning 219: local variable "playername" shadows a variable at a preceding level
Код:
new found, string[128], playername[MAX_PLAYER_NAME];
(5278 ) : warning 203: symbol is never used: "OnPlayerLogin"
Код:
OnPlayerLogin(playerid,password)
Re: need little help with TAB -
RajatPawar - 06.03.2013
That was just an example. He showed you the basic algorithm, expecting you to code on your own!
Re: need little help with TAB -
shady001 - 06.03.2013
That was just an example, for you to understand how things work and how can you do it. Sorry but i can't give you something that you must just copy in to your GameMode because i don't have any info' about your PlayerData or other stuffs like this , I'll say it again it is just an example , after that example you should be able to do your own code that fits your GameMode.