SA-MP Forums Archive
Need Help in a little thing please "+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: Need Help in a little thing please "+Rep" (/showthread.php?tid=351219)



Need Help in a little thing please "+Rep" - [GF]Logic - 15.06.2012

Hello every one i am working on a TDM game mode for my server anyways i got a problem i don't know what to do i am trying to make the spawn button and the 2 arrows disappear but i dunno how can some one tell me !!


Re: Need Help in a little thing please "+Rep" - RoleplayEditor - 15.06.2012

use textdraw to hide them.


Re: Need Help in a little thing please "+Rep" - tiernantheman - 15.06.2012

All that is necessary is this:


pawn Код:
#define ClearChat(%0) for(new i=0; i<20; i++) SendClientMessage(%0, -1, " ")

public OnPlayerRequestClass(playerid, classid)
{
    SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0); // Without this you'll be kicked when you spawn. Set it to wherever you want.
    TogglePlayerSpectating(playerid, true);
    SetTimerEx("login_dialog", 100, 0, "i", playerid);
    return 1;
}

forward login_dialog(playerid);
public login_dialog(playerid)
{
    SetPlayerCameraPos(playerid, x, y, z);
    SetPlayerCameraLookAt(playerid, x, y, z);
   
    // Show dialogs etc. here
   
    ClearChat(playerid); // Custom macro to send some empty clientmessages
    return 1;
}
Result:


If you need messages in chat, remove the ClearChat() line, but I'd recommend keeping it clear as on low resolutions the chat ends up over the dialog.

To spawn players after that, it's extremely simple:


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



Re: Need Help in a little thing please "+Rep" - Littlehelper - 15.06.2012

Show us your OnPlayerRequestClass callback.
EDIT: i dont understand what you said, do you want to disappear Spawn button or what?


Re: Need Help in a little thing please "+Rep" - [GF]Logic - 15.06.2012

Thanks Guys i Made it in a different way thanks anyway

tiernantheman +Rep thanks