need little help with TAB
#1

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
Reply
#2

You would need to use SetPlayerName but everyone would see name like that above VIPs' head.
Reply
#3

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.
Reply
#4

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)
Reply
#5

That was just an example. He showed you the basic algorithm, expecting you to code on your own!
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: