How to make it.. - 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: How to make it.. (
/showthread.php?tid=475517)
How to make it.. -
Lajko1 - 13.11.2013
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;
}
Re: How to make it.. -
SkittlesAreFalling - 13.11.2013
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
Re: How to make it.. -
Lajko1 - 13.11.2013
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..
Re: How to make it.. -
SkittlesAreFalling - 13.11.2013
SetTimerEx("SomeFunction", (Milliseconds), false, "d", playerid);
^Something like this mate.
https://sampwiki.blast.hk/wiki/SetTimerEx
Re: How to make it.. -
Lajko1 - 13.11.2013
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; ?
Re: How to make it.. -
SkittlesAreFalling - 13.11.2013
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.