SA-MP Forums Archive
Simple 'doors' help ASAP! - 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: Simple 'doors' help ASAP! (/showthread.php?tid=446824)



Simple 'doors' help ASAP! - Aerotactics - 27.06.2013

Ok, I'm trying to make a simple door system that ultimately does this: Walk into arrow, show up in custom interior (meanwhile, destroying the first arrow, to assume the door is locked/occupied). Exit out another arrow, which recreates the first arrow, so that someone else may now occupy the space. I keep getting this error, though:
Quote:

C:\Users\Aerotactics' PC\Desktop\SAMP\filterscripts\[RP]LSM2.pwn(66) : warning 202: number of arguments does not match definition
C:\Users\Aerotactics' PC\Desktop\SAMP\filterscripts\[RP]LSM2.pwn(66) : warning 202: number of arguments does not match definition
C:\Users\Aerotactics' PC\Desktop\SAMP\filterscripts\[RP]LSM2.pwn(66) : warning 202: number of arguments does not match definition
C:\Users\Aerotactics' PC\Desktop\SAMP\filterscripts\[RP]LSM2.pwn(66) : warning 202: number of arguments does not match definition

And here's my script. If you can fix it, please respond ASAP!

Код:
//LSM
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" [RP] Los Santos Motel Loaded! ");
	print("--------------------------------------\n");
	return 1;
}
#endif
new mi1;
/*new mi2;
new mi3;
new mi4;
new mi5;
new mi6;
new mi7;
new mi8;
new mi9;
new mi10;
new mi11;
new mi12;
new mi13;
new mi14;
new mi15;
new mi16;*/
new mo1;
/*new mo2;
new mo3;
new mo4;
new mo5;
new mo6;
new mo7;
new mo8;
new mo9;
new mo10;
new mo11;
new mo12;
new mo13;
new mo14;
new mo15;
new mo16;
new info;*/
public OnGameModeInit()
{
	mi1 = CreatePickup(1559, 1, 2151.5, -1789.19995, 12.9, -1);
	mo1 = CreatePickup(1559, 1, 2140.1001, -1798.19995, 968.20001, -1);
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == mi1)
	{
        SetPlayerPos(playerid, 2140, -1796.09998, 968.70001);
        DestroyPickup(mi1);
    }
    if(pickupid == mo1)
    {
        SetPlayerPos(playerid, 2156.6001, -1800.69995, 14.3);
        CreatePickup(mi1);
    }
	return 1;
}
"mi1" stands for 'Motel In 1', and there are 16 doors total, and for each in, there must be an out: "mo1" is 'Motel Out 1'.


Re: Simple 'doors' help ASAP! - Aerotactics - 27.06.2013

Anything? I need a fix as soon as possible!


Re: Simple 'doors' help ASAP! - ReVo_ - 27.06.2013

Quote:

Parameters:
(model, type, Float:X, Float:Y, Float:Z, Virtualworld)
model The model of the pickup.
type The pickup spawn type.
Float:X The X coordinate to create the pickup at.
Float:Y The Y coordinate to create the pickup at.
Float:Z The Z coordinate to create the pickup at.
virtualworld The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds.
https://sampwiki.blast.hk/wiki/CreatePickup

mi1 = CreatePickup(model, x, y, z, VW);

model and id are different things, anyway.

CreateObjects return the ID of the pickup.


Re: Simple 'doors' help ASAP! - Aerotactics - 27.06.2013

Quote:
Originally Posted by ReVo_
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/CreatePickup

mi1 = CreatePickup(model, x, y, z, VW);

model and id are different things, anyway.

CreateObjects return the ID of the pickup.
I decided not to have the destroy factor, it was unnecessary to add I realized, so I just added a charge of 200 dollars each time a player enters any motel rooms. If they get killed by a stranger that enters, well it cost the stranger 200 dollars to enter, so he better be packing!