Jump to content
  • 0

pomoc Objekty se neobjeví


Lachtanex

Dotaz

Čaute prosím o pomoc dělám v editoru různé stunt letiště a když to dám z .pwn do .amx a dám to do serveru restartuju server napíše že to ten FS načetlo ale když jdu /dragls tak tam žádný stunt objekty nejsou prosím pomoc :)


Ještě přidám :

#include <a_samp>

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Test");
    print("--------------------------------------\n");
    return 1;
}
CreateObject(1655, 1791.88, -2508.71, 13.00,   0.00, 0.00, 89.00);
CreateObject(1655, 1792.15, -2492.45, 13.00,   0.00, 0.00, 89.00);
CreateObject(1655, 1791.98, -2501.02, 13.00,   0.00, 0.00, 89.00);
CreateObject(1655, 1792.37, -2484.05, 13.00,   0.00, 0.00, 89.00);
CreateObject(1655, 1806.00, 907.00, -2516.00,   0.00, 0.00, 0.00);
CreateObject(1655, 1816.00, 4229.00, -2500.00,   0.00, 0.00, 0.00);
CreateObject(1655, 1789.04, -2483.97, 15.00,   16.00, 0.00, 89.00);
CreateObject(1655, 1788.89, -2492.52, 15.00,   16.00, 0.00, 89.00);
CreateObject(1655, 1788.77, -2500.79, 15.00,   16.00, 0.00, 89.00);
CreateObject(1655, 1788.55, -2508.50, 15.00,   16.00, 0.00, 89.00);
CreateObject(1655, 1786.31, -2508.32, 17.00,   33.00, 0.00, 89.00);
CreateObject(1655, 1786.50, -2500.01, 17.00,   33.00, 0.00, 89.00);
CreateObject(1655, 1786.55, -2491.45, 17.00,   33.00, 0.00, 89.00);
CreateObject(1655, 1786.69, -2483.96, 17.00,   33.00, 0.00, 89.00);
CreateObject(18750, 1799.18, -2421.03, 111.00,   84.00, 0.00, -4.00);
CreateObject(18780, 1749.14, -2461.34, 24.00,   0.00, 0.00, 0.00);
CreateObject(2000, 1751.73, -2422.63, 19.00,   0.00, 0.00, 0.00);
CreateObject(18983, 1682.97, -2579.87, 18.00,   0.00, 0.00, 91.00);
CreateObject(1655, 1736.43, -2579.54, 11.00,   0.00, 0.00, 87.00);
public OnFilterScriptExit()
{
    return 1;
}

#else
#endif

    Prosím pomoc moc nerozumím pawnu :)

Link to comment
Share on other sites

10 odpovědí na tuto otázku

Recommended Posts

  • 0

ale pomohlo, len ešte musíš opraviť chyby, ktoré si narobil..
PS: funkcie (ako napr. CreateObject) môžeš používať len v iných funkciách/callbackoch (napr. OnFilterScriptInit), nie mimo!

Link to comment
Share on other sites

  • 0

proste si chcel použiť funkciu mimo inej - error

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Test");
    print("--------------------------------------\n");
    return 1;
}
CreateObject(1655, 1791.88, -2508.71, 13.00,   0.00, 0.00, 89.00);
...

zmeň na:
 

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("Test");
    print("--------------------------------------\n");

    CreateObject(1655, 1791.88, -2508.71, 13.00,   0.00, 0.00, 89.00);
    ...
    return 1;
}

Link to comment
Share on other sites

  • 0
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
 
#include <a_samp>
 
#define COLOR_YELLOW 0xFFFF00AA
 
#pragma tabsize 0
 
#if defined FILTERSCRIPT
 
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
 
public OnFilterScriptExit()
{
return 1;
}
 
#else
 
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
 
#endif
 
public OnGameModeInit()
{
CreateObject(1655, 1791.88, -2508.71, 13.00,   0.00, 0.00, 89.00); //
CreateObject(1655, 1792.15, -2492.45, 13.00,   0.00, 0.00, 89.00); //
CreateObject(1655, 1791.98, -2501.02, 13.00,   0.00, 0.00, 89.00); //
CreateObject(1655, 1792.37, -2484.05, 13.00,   0.00, 0.00, 89.00); //
CreateObject(1655, 1806.00, 907.00, -2516.00,   0.00, 0.00, 0.00); //
CreateObject(1655, 1816.00, 4229.00, -2500.00,   0.00, 0.00, 0.00); //
CreateObject(1655, 1789.04, -2483.97, 15.00,   16.00, 0.00, 89.00); //
CreateObject(1655, 1788.89, -2492.52, 15.00,   16.00, 0.00, 89.00); //
CreateObject(1655, 1788.77, -2500.79, 15.00,   16.00, 0.00, 89.00); //
CreateObject(1655, 1788.55, -2508.50, 15.00,   16.00, 0.00, 89.00); //
CreateObject(1655, 1786.31, -2508.32, 17.00,   33.00, 0.00, 89.00); //
CreateObject(1655, 1786.50, -2500.01, 17.00,   33.00, 0.00, 89.00); //
CreateObject(1655, 1786.55, -2491.45, 17.00,   33.00, 0.00, 89.00); //
CreateObject(1655, 1786.69, -2483.96, 17.00,   33.00, 0.00, 89.00); //
CreateObject(18750, 1799.18, -2421.03, 111.00,   84.00, 0.00, -4.00); //
CreateObject(18780, 1749.14, -2461.34, 24.00,   0.00, 0.00, 0.00); //
CreateObject(2000, 1751.73, -2422.63, 19.00,   0.00, 0.00, 0.00); //
CreateObject(18983, 1682.97, -2579.87, 18.00,   0.00, 0.00, 91.00); //
CreateObject(1655, 1736.43, -2579.54, 11.00,   0.00, 0.00, 87.00); //
///////////////////////////AUTA///////////////////////////////////
AddStaticVehicle(411,1979.2661,-2181.9160,13.2740,180.4108,3,0); // Infernus Dragls
AddStaticVehicle(415,1987.1613,-2181.8201,13.3185,179.5031,147,0); // Cheetah Dragls
AddStaticVehicle(522,1969.7058,-2191.7043,13.1226,274.5461,3,0); // NRG-500 Dragls
AddStaticVehicle(560,1974.3988,-2182.1436,13.2523,179.3448,93,0); // Sultan Dragls
return 1; // tu bola chyba Ďalšia chyba neukončil si pulic
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/dragls", cmdtext, true, 6) == 0)
{
GivePlayerMoney(playerid, 100); // Pridá 100 $ za teleportovanie na /dragls
SetPlayerInterior(playerid, 0); // nadstavíme interier 0 ak by si sa portoval z interieru nejakého domu / casina ... aby sa to nebuglo
SetPlayerPos(playerid, 1984.4642,-2180.4985,13.5469); // Suradnice cieľoveho portu (Letisko LS)
SetPlayerFacingAngle(playerid, 184.6770); // natočenie hráča
SendClientMessage(playerid, COLOR_YELLOW ,"Teleportoval si sa na Dragls"); // Správa do chatu kde si sa portol
}
return 1;
}

 

 

Skúšal som to objekty fungujú + máš port /dragls ale nebude sa dať portovať s autom. Ak by si potreboval viac help s mapami daj vedieť celkom o tom viem :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...