SA-MP Forums Archive
Need help with /briefcase - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help with /briefcase (/showthread.php?tid=319217)



Need help with /briefcase - trapped1 - 18.02.2012

Код:
warning 213: tag mismatch
warning 202: number of arguments does not match definition
Код:
	if(strcmp(cmd, "/briefcase", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pBCase] == 1)
			{
				if(BCase[playerid] == 0)
				{
                    SetPlayerAttachedObject(playerid, 1210, 6,0.3,0.1,0,0,-90,0); // BriefCase
                    SendClientMessage(playerid, COLOR_WHITE, " You have pulled out your briefcase. ");
                    BCase[playerid] = 1;
	        		return 1;
	        	}
	        	else if(BCase[playerid] == 1)
	        	{
                    RemovePlayerAttachedObject(playerid);
                    SendClientMessage(playerid, COLOR_WHITE, " You have put away your briefcase. ");
                    BCase[playerid] = 0;
	        		return 1;
	        	}
	        }
	        else
	        {
				SendClientMessage(playerid, COLOR_GRAD2, " You don't own a briefcase !");
				return 1;
			}
	        return 1;
		}
		return 1;
	}



Re: Need help with /briefcase - milanosie - 18.02.2012

what lines are the errors


Re: Need help with /briefcase - trapped1 - 18.02.2012

SetPlayerAttachedObject(playerid, 1210, 6,0.3,0.1,0,0,-90,0); // BriefCase
RemovePlayerAttachedObject(playerid);

In those lines..


Re: Need help with /briefcase - Rg-Gaming.Info - 02.07.2012

I have this problem too.... anyone can help ?


Respuesta: Need help with /briefcase - [DOG]irinel1996 - 02.07.2012

Check this:
https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject
You're mixing the parameters. And this one too: https://sampwiki.blast.hk/wiki/RemovePlayerAttachedObject
You have to specify the index.

Best regards!


Re: Need help with /briefcase - Rg-Gaming.Info - 02.07.2012

Yeah i looked at this one but im messing it up even more..... can you just transform those 2 and provide the code here ?


Respuesta: Need help with /briefcase - [DOG]irinel1996 - 02.07.2012

Try with this:
pawn Код:
SetPlayerAttachedObject(playerid, 0, 1210, 6, 0.3, 0.1, 0.0,-90.0,0.0,0.0);
RemovePlayerAttachedObject(playerid, 0);
____________________
EDIT:
@Rg-Gaming.Info: No problem.

(Hate make a new comment to say you're welcome. xD)


Re: Respuesta: Need help with /briefcase - Rg-Gaming.Info - 02.07.2012

Quote:
Originally Posted by irinel1996
Посмотреть сообщение
Try with this:
pawn Код:
SetPlayerAttachedObject(playerid, 0, 1210, 6, 0.3, 0.1, 0.0,-90.0,0.0,0.0);
RemovePlayerAttachedObject(playerid, 0);
Thanks it worked !