SA-MP Forums Archive
OnplayerRequestClass [+REP] - 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: OnplayerRequestClass [+REP] (/showthread.php?tid=528571)



OnplayerRequestClass [+REP] - arlindi - 28.07.2014

Hello everybody i got a server from forum. thanks for the serve.
But i want to delete dhat Onplayerrequestclass
PHP код:
<   >   Spawn 
I want to delete this.
I deleted onplayerrequestclass and addplayerclass in OnGameModeInit.

Hellp mee pease.


Re: OnplayerRequestClass [+REP] - Clad - 28.07.2014

pawn Код:
TogglePlayerSpectating(playerid, false);



Re: OnplayerRequestClass [+REP] - arlindi - 28.07.2014

Where to add this ?


Re: OnplayerRequestClass [+REP] - Insidious - 28.07.2014

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
   TogglePlayerSpectating(playerid, false);
   return 1;
}
+REP please


Re: OnplayerRequestClass [+REP] - Clad - 28.07.2014

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0);
    TogglePlayerSpectating(playerid, true);
    SpawnPlayer(playerid);
    SetTimerEx("NoSpawnBoutton", 500, false, "i", playerid);
    return 1;
}
forward NoSpawnBoutton(playerid);
public NoSpawnBouttontClass(playerid)
{
    SpawnPlayer(playerid);
    TogglePlayerSpectating(playerid, false);
    return 1;
}



Re: OnplayerRequestClass [+REP] - arlindi - 28.07.2014

Still not work for mee -.-


Re: OnplayerRequestClass [+REP] - ViniBorn - 28.07.2014

Try use TogglePlayerSpectating in OnPlayerConnect


Re: OnplayerRequestClass [+REP] - arlindi - 28.07.2014

He dont hide it Please help mee


Re: OnplayerRequestClass [+REP] - Clad - 28.07.2014

pawn Код:
SetTimerEx("NoSpawnBoutton", 100, false, "i", playerid);
Try this


Re: OnplayerRequestClass [+REP] - arlindi - 28.07.2014

Ok i mode it to
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetSpawnInfo(playerid000030000000);
    
TogglePlayerSpectating(playeridtrue);
    
//SpawnPlayer(playerid);
    
SetTimerEx("NoSpawnBoutton"100false"i"playerid);
    return 
1;
}
forward NoSpawnBoutton(playerid);
public 
NoSpawnBoutton(playerid)
{
    
//SpawnPlayer(playerid);
    
TogglePlayerSpectating(playeridfalse);
    return 
1;

Because i dont want to spawn but he spawn mee automaticly.