How to? -
Jimmy1 - 24.06.2009
1. I want auto spawn after login.without pressing SHIFT
2.How to make a tutorial,Want to freeze during tut?
thanks
Re: How to? -
BMUK - 24.06.2009
Use
SpawnPlayer(playerid); in your /login command after all the error messages such as wrong password etc?
Re: How to? -
Jimmy1 - 24.06.2009
and tutorial?
Re: How to? -
abhinavdabral - 24.06.2009
Yes, BMUK has given a good idea... when your login is sucessful, just do
SpawnPlayer(playerid);
EDIT: And for tutorial mode.. you can use
1) Change player's world.. So that others wont kill or disturb him/her during the tutorial.
2) Use
TogglePlayerControllable(playerid,0); to make the player freeze.
3) use
TogglePlayerControllable(playerid,1); to unfreeze the player after your tutorial is finished.
Re: How to? -
BMUK - 24.06.2009
search for and download the GodFather script, it has a tutorial in it. Much more educational if you read that instead of trying to work out 20 different replies here saying basicly the same thing!
and its TogglePlayer
Controllable(playerid,0); - Lets not confuse him any more :P
Re: How to? -
abhinavdabral - 24.06.2009
Sorry for Double post.... but.to change the world.use
SetPlayerVirtualWorld(playerid,201);
and after the tutorial is completed, just change the world to default
SetPlayerVirtualWorld(playerid,0);
Re: How to? -
Jimmy1 - 24.06.2009
for autologin: this is LAdmin login command is this correct
Код:
dcmd_alogin(playerid,params[])
{
if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,red,"ACCOUNT: You are already logged in.");
if (!udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,red,"ACCOUNT: Account doesn't exist, please use '/aregister [password]'.");
if (strlen(params)==0) return SendClientMessage(playerid,red,"ACCOUNT: Correct usage: '/alogin [password]'");
if (udb_CheckLogin(PlayerName2(playerid),params))
{
new file[256], tmp3[100], string[128];
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(PlayerName2(playerid)) );
GetPlayerIp(playerid,tmp3,100);
dini_Set(file,"ip",tmp3);
LoginPlayer(playerid);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
if(PlayerInfo[playerid][Level] > 0) {
format(string,sizeof(string),"ACCOUNT: Successfully Logged In. (Level %d)", PlayerInfo[playerid][Level] );
return SendClientMessage(playerid,green,string);
} else return SendClientMessage(playerid,green,"ACCOUNT: Successfully Logged In");
}
else {
PlayerInfo[playerid][FailLogin]++;
printf("LOGIN: %s has failed to login, Wrong password (%s) Attempt (%d)", PlayerName2(playerid), params, PlayerInfo[playerid][FailLogin] );
if(PlayerInfo[playerid][FailLogin] == MAX_FAIL_LOGINS)
{
new string[128]; format(string, sizeof(string), "%s has been kicked (Failed Logins)", PlayerName2(playerid) );
SendClientMessageToAll(grey, string); print(string);
Kick(playerid);
}
return SendClientMessage(playerid,red,"ACCOUNT: Login failed! Incorrect Password");
SpawnPlayer(playerid);
SetSpawnInfo(playerid,0,25,1676.6926,1448.0596,10.7837,0,0,0,0,10,0);
}
}
Re: How to? -
abhinavdabral - 24.06.2009
Lol.... why are you asking that from us? ..
Re: How to? -
Jimmy1 - 24.06.2009
cause i dont know loL i need help
Re: How to? -
BMUK - 24.06.2009
I would put it right next to the "successfulyl logged in" message