One quick questions
#1

Hello everyone, i need some help in this

How can i disable the spawn buttons at the bottom of the screen in OnPlayerRequestClass, making them disappear or when click on one of these buttons, nothing happens.

Soumi.
Reply
#2

Here you go, and two wiki information about these two functions, get more knowledge what they do.
https://sampwiki.blast.hk/wiki/SetSpawnInfo
https://sampwiki.blast.hk/wiki/SpawnPlayer
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
    SetSpawnInfo(playerid, 0, 5, 1642.2006, -2334.4751, -2.6797, 1.0, -1, -1, -1, -1, -1, -1); // You need to rechange it, get nore knowledge from WIKI.
    SpawnPlayer(playerid);
    return 0;
}
Reply
#3

I'm going to apply this on my rp GM, while the player is answering the Quiz.
So this won't help me, i made that if player didn't finish the Quiz it will kick him if he attempts to spawn and OnPlayerRequestClass, it spawns him when he finished it, But i want to disable these Buttons xD

(Sorry for my bad english)
Reply
#4

Post here the public which represents the quiz test and the public when player finishes and passes.
Reply
#5

Easy idea. Make quiz in dialog, if he press exit ,kick. When he finishes quiz dialog dissapear and he can spawn. PM me if you need that scripted. I've already made a lot of Quizes of this kind.
Reply
#6

Nvm i added this code to OnPlayerSpawn
if(Player[playerid][Logged] == 0 && Player[playerid][ServerQuiz] == 0)
{
SendClientMessage(playerid, SYSTEM_COLOR, "You have to be logged in before spawning.");
Kick(playerid);
}

So if the player click on Spawn button he'll be auto kicked.

Edit: @[MG]Dimi, i already made that.

Thanks for helping anyway.
Reply
#7

hmm on my script if the player has not /login then the player class is automatically set to 0. this make it so the player stays at the selection screen and you can also sendclientmessage to your liking.
Reply
#8

Something else guys xD, How can i change the inputtext of the dialog into a variable, i made this
Player[playerid][Reason] = strlen(inputtext); but its not working..

(Sorry for my bad english)
Reply
#9

pawn Код:
format(Player[playerid][Reason], sizeof(Player[playerid][Reason]), "%s", inputtext);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)