atm issues
#1

Код:
CMD:makeatm(playerid, params[])
{
	if(!CheckAdmin(playerid, HIGH_ADMIN_LEVEL)) return NotAuthMSG(playerid);
	new atmid, atminfo[256], interior, Float:x, Float:y, Float:z;
	if(sscanf(params,"s[256]", atminfo)) return SyntaxMSG(playerid, "/makeatm [Info]");
	atmid = GetNextATMID();
	GetPlayerPos(playerid, x, y, z);
	interior = GetInterior(playerid);
	ATMInfo[atmid][atmPosX] = x;
	ATMInfo[atmid][atmPosY] = y;
	ATMInfo[atmid][atmPosZ] = z;
	ATMInfo[atmid][atmAtmOn] = 1;
	ATMInfo[atmid][atmInterior] = interior;
	format(ATMInfo[atmid][atmInfo], 256, "%s", atminfo);
	format(msg, sizeof(msg), ""EMBED_ORANGE"["EMBED_YELLOW"ATM-%d"EMBED_ORANGE"]\n"EMBED_WHITE"%s.\n"EMBED_LIGHTBLUE"/withdraw /balance", atmid, atminfo);
	ATMInfo[atmid][atmLabel] = CreateDynamic3DTextLabel(msg, -1, x, y, z, 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, -1, -1, 100.0);
	ATMInfo[atmid][atmPickUp] = CreateObject(2942, 1, x, y, z, -1, -1);
	AddATMToFile(atmid, atminfo, interior, x, y, z);
	format(msg, sizeof(msg), "A new ATM was added, [Info: %s, ID: %d]", atminfo, atmid);
	SCM(playerid, COLOR_GREEN, msg);
	return 1;
}


Код:
ATMInfo[atmid][atmPickUp] = CreateObject(2942, 1, x, y, z, -1, -1);

I type the command in game and it does not create that objectg any ideas?
Reply
#2

Well, your function CreateObject have not all arguments. And it probably can not work because of you use streamer plugin and you should not mix it with vanilla objects streamer.
Reply
#3

Im new at scripting and i don't know how to fix this, But i believe the script cant tell which coordinates are which, try using enum.

<a href="https://sampwiki.blast.hk/wiki/CreateObject"> Click here for more information on Creating Objects </a>
Reply
#4

Yea i fixed it i really need to stop be lazy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)