Код:
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);
have not all arguments. And it probably can not work because of you use
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>