How to make it..
#1

Well I was trying and I can't figure out, how can I make if player is masked it will hide his name when he will change interior..Here is /enter command

pawn Код:
if(strcmp("/enter", cmd, true) == 0) // enter property
    {
        if( lastPickup[playerid] != -1 || properties[lastPickup[playerid]][eType] > 0 ){
            new
                id = propPickups[lastPickup[playerid]],
                Float:x,
                Float:y,
                Float:z;

            GetPropertyEntrance( id, x, y, z );
            if( IsPlayerInRangeOfPoint( playerid, 3.0, x, y, z )){
                PutPlayerInProperty( playerid, id );
                SendClientMessage( playerid, 0xFFFFFFFF, "INFO:You have entered a property.. type /exit to leave" );
                return 1;
            }
        }
        return 1;
    }
Reply
#2

Save his actual name to a variable.
Set his name to a fake name.

Only way to do it unless you disable their nametags.
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Reply
#3

Well I was thinking about adding timer and Function where player's name will hide ? I'm using ShowPlayerNameTagForPlayer

But the main problem is I can't even figure out how to add If player is masked he will be able to enter the building and script will start timer..
Reply
#4

SetTimerEx("SomeFunction", (Milliseconds), false, "d", playerid);
^Something like this mate.

https://sampwiki.blast.hk/wiki/SetTimerEx
Reply
#5

I know how to use timer in this case but I need code like this:

if(Masked[playerid] == 1)
{
//And timer will start
//I need to skip return 1; here so player will be still able to enter in house?
}

But how to do it that player will be still able to enter in house I just need to skip return 1; ?
Reply
#6

after if( IsPlayerInRangeOfPoint( playerid, 3.0, x, y, z )){
put if(Masked[playerid] == 1) { SetTimerEx(...) }

for SetTimerEx fill in your parameters.
according to your code it will run the timer just before the masked player enters the house.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)