26.01.2011, 19:26
(
Последний раз редактировалось David5290; 26.01.2011 в 19:34.
Причина: Rest of code
)
public OnPlayerConnect(playerid)
{
new string[256], playername[MAX_PLAYER_NAME], file[255];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s has joined RuNix's Cops And Robbers!", playername);
Announce(string);
IsPlayerLogged[playerid] = 0;
RecentlyRobbed[playerid] = 0;
SelectBM[playerid] = 0;
AMMUBOX[playerid] = 0;
CSKINZ[playerid] = 0;
CSKINU[playerid] = 0;
CSKIN[playerid] = 0;
CHALLBOX[playerid] = 0;
IcmdCar[playerid][CarcmdI] = -1;
IsSpawned[playerid] =0;
GPSTimer[playerid] = 0;
HaveGPS[playerid] = false;
Muted[playerid] = 0;
AccountInfo[playerid][aLevel] = 0;
//Text Draws
TextDrawShowForPlayer(playerid, BOX);
TextDrawShowForPlayer(playerid, Welcome);
TextDrawShowForPlayer(playerid, text1);
TextDrawShowForPlayer(playerid, text2);
TextDrawShowForPlayer(playerid, text3);
HaveTicket[playerid] = false;
new Registre[250];
format(file, sizeof(file), "%s.runix", playername);
if(fexist(file))
{
GetPlayerName(playerid,playername,MAX_PLAYER_NAME) ;
format(Registre,sizeof(Registre),"Welcome back %s!\n\nPlease Login to continue!",playername);
ShowPlayerDialog(playerid,LoginName,DIALOG_STYLE_I NPUT,"Login",Registre,"Login","Ban");
}
else
if(!fexist(file))
{
GetPlayerName(playerid,playername,MAX_PLAYER_NAME) ;
format(Registre,sizeof(Registre),"Welcome %s!\n\nPlease register to continue!",playername);
ShowPlayerDialog(playerid,RegisterName,DIALOG_STYL E_INPUT,"Register",Registre,"Register","Ban");
}
return true;
}
How would I add this code for the clock?
public OnPlayerConnect(playerid)
{
SetTimer("TimeUpdate",65009, 1);
TogglePlayerClock(playerid, 1);
return 1;
}
Much appreciated.
{
new string[256], playername[MAX_PLAYER_NAME], file[255];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s has joined RuNix's Cops And Robbers!", playername);
Announce(string);
IsPlayerLogged[playerid] = 0;
RecentlyRobbed[playerid] = 0;
SelectBM[playerid] = 0;
AMMUBOX[playerid] = 0;
CSKINZ[playerid] = 0;
CSKINU[playerid] = 0;
CSKIN[playerid] = 0;
CHALLBOX[playerid] = 0;
IcmdCar[playerid][CarcmdI] = -1;
IsSpawned[playerid] =0;
GPSTimer[playerid] = 0;
HaveGPS[playerid] = false;
Muted[playerid] = 0;
AccountInfo[playerid][aLevel] = 0;
//Text Draws
TextDrawShowForPlayer(playerid, BOX);
TextDrawShowForPlayer(playerid, Welcome);
TextDrawShowForPlayer(playerid, text1);
TextDrawShowForPlayer(playerid, text2);
TextDrawShowForPlayer(playerid, text3);
HaveTicket[playerid] = false;
new Registre[250];
format(file, sizeof(file), "%s.runix", playername);
if(fexist(file))
{
GetPlayerName(playerid,playername,MAX_PLAYER_NAME) ;
format(Registre,sizeof(Registre),"Welcome back %s!\n\nPlease Login to continue!",playername);
ShowPlayerDialog(playerid,LoginName,DIALOG_STYLE_I NPUT,"Login",Registre,"Login","Ban");
}
else
if(!fexist(file))
{
GetPlayerName(playerid,playername,MAX_PLAYER_NAME) ;
format(Registre,sizeof(Registre),"Welcome %s!\n\nPlease register to continue!",playername);
ShowPlayerDialog(playerid,RegisterName,DIALOG_STYL E_INPUT,"Register",Registre,"Register","Ban");
}
return true;
}
How would I add this code for the clock?
public OnPlayerConnect(playerid)
{
SetTimer("TimeUpdate",65009, 1);
TogglePlayerClock(playerid, 1);
return 1;
}
Much appreciated.