20.09.2011, 19:19
On class selection say you have police,robber etc. How could i make a class so you have to enter a password to spawn when you click spawn?
Returning 0 in this callback will prevent the player from spawning |
public OnPlayerRequestSpawn(playerid)
{
if(team == COPS) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Enter Password To Spawn!", "Please Enter A Password To Spawn:", "Ok", "Nope"), 0;
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1 && response)
{
if(!strcmp(inputtext, "SuperPassword", true))
{
SpawnPlayer(playerid);
SendClientMessage(playerid,-1,"Your password was correct! Enjoy the server!");
}
}
return 1;
}