SA-MP Forums Archive
a small Question. - 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: a small Question. (/showthread.php?tid=355208)



a small Question. - Gangster-rocks - 29.06.2012

How to hide a player from the map like the RP servers?


Re: a small Question. - Neil. - 29.06.2012

Here you go:
ShowPlayerMarkers

You have to put it here
PHP код:
public OnGameModeInit()
{
ShowPlayerMarkers(mode);

Modes, taken from the wiki
Quote:

PLAYER_MARKERS_MODE_OFF (0)
PLAYER_MARKERS_MODE_GLOBAL (1)
PLAYER_MARKERS_MODE_STREAMED (2)

You have to use '0' if you don't want to use player markers


Re: a small Question. - Gangster-rocks - 29.06.2012

Thanks +REP


Re: a small Question. - Gangster-rocks - 29.06.2012

Код:
C:\DOCUME~1\admin\Desktop\NEF7FE~1\GAMEMO~1\sd.pwn(91) : error 029: invalid expression, assumed zero
C:\DOCUME~1\admin\Desktop\NEF7FE~1\GAMEMO~1\sd.pwn(91) : warning 215: expression has no effect
C:\DOCUME~1\admin\Desktop\NEF7FE~1\GAMEMO~1\sd.pwn(91) : error 001: expected token: ";", but found ")"
C:\DOCUME~1\admin\Desktop\NEF7FE~1\GAMEMO~1\sd.pwn(91) : error 029: invalid expression, assumed zero
C:\DOCUME~1\admin\Desktop\NEF7FE~1\GAMEMO~1\sd.pwn(91) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
OMG Why.


Re: a small Question. - Neil. - 29.06.2012

Post your OnGameModeInit callback and let's see what's the problem


Re: a small Question. - Cxnnor - 29.06.2012

pawn Код:
public OnGameModeInit()
{
    ShowPlayerMarkers(mode);
}
Try that, the function was in line with the call back.


Re: a small Question. - Gangster-rocks - 29.06.2012

pawn Код:
public OnGameModeInit()
{
    SetGameModeText("Blank Script");
    Create3DTextLabel("Hello all players welcome to our DM drift Stunt server",COLOR_BLUE,1761.9919,-1897.3198,13.5625,283.6838,0,1);
    ShowPlayerMarkers(PLAYER_MARKERS_MODE_OFF (0));
    AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(271,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(272,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddStaticVehicle(562,1769.7545,-1898.3033,13.2228,265.1697,79,86); //
    AddStaticVehicle(562,1778.3405,-1932.7285,13.0462,184.5860,79,86); //
    AddStaticVehicle(562,1803.9685,-1927.2227,13.0476,271.3448,79,86); //
    AddStaticVehicle(562,1797.0353,-1887.1613,13.0614,359.2682,79,86); //
    AddStaticVehicle(562,1804.2714,-1898.8105,13.0618,264.8163,79,86); //
    AddStaticVehicle(402,1793.6714,-1904.3647,13.3883,266.2859,1,1); //
    AddStaticVehicle(402,1793.4730,-1907.0464,13.3873,262.7562,1,1); //
    AddStaticVehicle(411,1787.6880,-1909.3257,13.1228,87.1662,1,1); //
    AddStaticVehicle(411,1788.5352,-1906.4871,13.1226,87.6389,1,1);
    return 1;
}



Re: a small Question. - Neil. - 29.06.2012

Quote:
Originally Posted by Cxnnor
Посмотреть сообщение
pawn Код:
public OnGameModeInit()
{
    ShowPlayerMarkers(mode);
}
Try that, the function was in line with the call back.
That isn't the problem, when it isn't properly tabbed out, it should have a loose indent warning, which is far from the problems from the said above.......
Also you should return 1;

EDIT: lol, why did you copy the name of the modes
It should be like this btw
PHP код:
ShowPlayerMarkers(0); 



Re: a small Question. - Gangster-rocks - 29.06.2012

Trolololololololololololololololololololololololol ololololololololololololololololololololololololol olololol..... to be continued