Player disconnects on command,
#1

I've got a /clothes and /skin command, and if a player inputs either of them they disconnect, the server doesn't crash, just them.

Here is what the command uses:
Код:
public IsAtClothShop(playerid)
{
    if(IsPlayerConnected(playerid))
	{
        if(IsPlayerInRangeOfPoint(playerid,25.0,286.148986,-40.644397,1001.515625) || IsPlayerInRangeOfPoint(playerid,25.0,286.800994,-82.547599,1001.515625))
		{//Binco & Suburban
		    return 1;
		}
		else if(IsPlayerInRangeOfPoint(playerid,296.919982,-108.071998,1001.515625) || IsPlayerInRangeOfPoint(playerid,50.0,314.820983,-141.431991,999.601562))
		{//Zip & Victim
		    return 1;
		}
	}
	return 0;
}
It detects if their in a clothing store and if not it tells them to go to one, I'm almost positive it has something to do with that.
Reply
#2

i don't believe that's the problem
Reply
#3

Well here's one of the commands that people disconnect when doing:

Код:
if(strcmp(cmd, "/skin", true) == 0)
	{
	if(!IsAtClothShop(playerid)) return SendClientMessage(playerid, 0x919191FF, "You are not inside a clothing store.");
 	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Usage: /skin [SKINID]");
 	new chosenskin = strval(tmp);
 	SetPlayerSkin(playerid, chosenskin);
 	PlayerInfo[playerid][pModel] = chosenskin;
 	return 1;
 }
When I first implanted it it worked but for some reason it's not anymore.
Reply
#4

The command doesnt show anything that would make them disconnect, maybe it is a conflict between few commands and this?
Reply
#5

Errr..... I saw something wrong in....

pawn Код:
public IsAtClothShop(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid,25.0,286.148986,-40.644397,1001.515625) || IsPlayerInRangeOfPoint(playerid,25.0,286.800994,-82.547599,1001.515625))
        {//Binco & Suburban
            return 1;
        }
        else if(IsPlayerInRangeOfPoint(playerid,/* Here, no ranges.*/296.919982,-108.071998,1001.515625) || IsPlayerInRangeOfPoint(playerid,50.0,314.820983,-141.431991,999.601562))
        {//Zip & Victim
            return 1;
        }
    }
    return 0;
}
Also I didn't believe that can be the problem....
Reply
#6

Quote:
Originally Posted by Basicz
Посмотреть сообщение
Errr..... I saw something wrong in....

pawn Код:
public IsAtClothShop(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid,25.0,286.148986,-40.644397,1001.515625) || IsPlayerInRangeOfPoint(playerid,25.0,286.800994,-82.547599,1001.515625))
        {//Binco & Suburban
            return 1;
        }
        else if(IsPlayerInRangeOfPoint(playerid,/* Here, no ranges.*/296.919982,-108.071998,1001.515625) || IsPlayerInRangeOfPoint(playerid,50.0,314.820983,-141.431991,999.601562))
        {//Zip & Victim
            return 1;
        }
    }
    return 0;
}
Also I didn't believe that can be the problem....
Didn't see that, but for some odd reason it fixed it, thankyou.
Reply
#7

Ohhh, your welcome
You need to read the script carefully to repair if something is wrong. :P
Reply
#8

Hang on; although granted there was an error in the script - surely the compiler would of picked that up as a missing argument?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)