[NOT SOLVED]Help Please
#1

Hi, I need help with /login script. When you /login I don't want it to spawn straight away with the clown skin, I just want it to say "You have logged in" and you may choose your skin. This is my /login code.

Код:
	if (strcmp(cmd, "/login", true) ==0 )
	{
	  if(IsPlayerConnected(playerid))
	  {
	    new tmppass[64];
			if(gPlayerLogged[playerid] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /login [password]");
				return 1;
			}
			strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
			Encrypt(tmppass);
			OnPlayerLogin(playerid,tmppass);
		}
		return 1;
	}
Reply
#2

Well when you were compiling on that one you just did there was 11 errors and now I got you down to 6 errors....

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmd, "/login", true) ==0 )
{
if(IsPlayerConnected(playerid)
{
tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, WHITE, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, GRAD1, "USAGE: /login [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 0;
}
Reply
#3

Quote:
Originally Posted by SampStunta
Well when you were compiling on that one you just did there was 11 errors and now I got you down to 6 errors....

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmd, "/login", true) ==0 )
{
if(IsPlayerConnected(playerid)
{
tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, WHITE, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, GRAD1, "USAGE: /login [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 0;
}
That code had no errors.. I have no errors. I just don't want it to log with the clown skin. when you /login it spawns automatically with Clown skin if you're a new player.
Reply
#4

No like when compiling it comes up with the errors thing and it said that the one you gave me had 11 errors and I modified it to make it have only 6 errors...
Reply
#5

Quote:
Originally Posted by SampStunta
No like when compiling it comes up with the errors thing and it said that the one you gave me had 11 errors and I modified it to make it have only 6 errors...
I'm not confessing about errors.. When I /login it spawns with the clown skin and goes to the tutorial which is correct but, i don't want it to spawn with the clown skin.
Reply
#6

Have you added any more skin id s apart from the clown id?
Reply
#7

Quote:
Originally Posted by SampStunta
Have you added any more skin id s apart from the clown id?
No, I found out the clown skin id which is 264
Reply
#8

Okay thats the problem you need to add more skins to spawn from...
Reply
#9

Quote:
Originally Posted by SampStunta
Okay thats the problem you need to add more skins to spawn from...
I have all the skins ffs, I found the code in these area's

Location:public OnPlayerLogin(playerid,password[])
Code:PlayerInfo[playerid][pModel] = 264;

Location:public OnPlayerConnect(playerid)
Code:PlayerInfo[playerid][pModel] = 264;

WHEN THE PLAYER DOES THE /LOGIN I WANT IT TO STAY AT SKIN SELECTION!
Reply
#10

Is server open now?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)