Posts: 591
Threads: 121
Joined: Oct 2010
Reputation:
0
hi, I need a code that makes it ask for a password when trying to join a team, plz help me, it is really important for my server
Posts: 2,431
Threads: 86
Joined: Nov 2009
Reputation:
0
First, have you even attempted to make it yourself? With even a little bit of knowledge?
Posts: 591
Threads: 121
Joined: Oct 2010
Reputation:
0
I tried a lot of things, but still didn't work
Posts: 409
Threads: 40
Joined: May 2009
Reputation:
0
It's called.... The search bar! Alot of tutorials.
Posts: 591
Threads: 121
Joined: Oct 2010
Reputation:
0
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(1075) : warning 202: number of arguments does not match definition
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(1170) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
what would that be ?
Posts: 591
Threads: 121
Joined: Oct 2010
Reputation:
0
#define JOINSTARS 1337
if(strcmp(cmd, "/stars", true) ==0)//this is never shown because I didn't know how to make it ask for a password
{
if(team[playerid] == 0)
{
team[playerid] = 6;
ShowPlayerDialog(playerid, JOINSTARS, DIALOG_STYLE_INPUT, "Please enter the password to join with cops.", "Submit", "Cancel");
SendClientMessage(playerid,GREEN,"You may now spawn.");
HideMenuForPlayer(mainmenu,playerid);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == JOINSTARS)
{
if(!strcmp(inputtext, "1598753", true))
{
SetPlayerColor(playerid,BLUE);
SetPlayerTeam(playerid, 1);
SetPlayerPos(playerid,1624.2527,1821.0498,10.8203) ;
SetPlayerFacingAngle(playerid,5.6779);
SetPlayerSkin(playerid,287);
GivePlayerWeapon(playerid,31,300);
GivePlayerWeapon(playerid,24,300);
GivePlayerMoney(playerid, 20000);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid, 100);
return 1;
}
}