SA-MP Forums Archive
How do I add these in game? - 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: How do I add these in game? (/showthread.php?tid=398029)



How do I add these in game? - fate003142 - 07.12.2012

I'm new to adding objects in game along with scripting and I want to know how do I add these in the game? I already know that you need to copy and paste these in pawno, and it needs to be under OnGameModeInit but how is it sposto
look?

CreateObject(1442, 2841.42, -2537.80, 17.78, 0.00, 0.00, 0.00);
CreateObject(1220, 2835.84, -2536.68, 17.46, 0.00, 0.00, 0.00);
CreateObject(3092, 2839.97, -2540.00, 3092.00, 207.00, 251.00, 178.00);
CreateObject(3092, 2840.10, -2537.42, 17.41, 84.00, 33.00, 0.00);
CreateObject(3009, 2841.69, -2537.72, 16.84, 222.00, 207.00, 25.00);


Re: How do I add these in game? - ikkentim - 07.12.2012

public OnGameModeInit()
{
//some other code may be here

CreateObject(1442, 2841.42, -2537.80, 17.78, 0.00, 0.00, 0.00);
CreateObject(1220, 2835.84, -2536.68, 17.46, 0.00, 0.00, 0.00);
CreateObject(3092, 2839.97, -2540.00, 3092.00, 207.00, 251.00, 178.00);
CreateObject(3092, 2840.10, -2537.42, 17.41, 84.00, 33.00, 0.00);
CreateObject(3009, 2841.69, -2537.72, 16.84, 222.00, 207.00, 25.00);

//some other code may be here
}


Re: How do I add these in game? - Devilxz97 - 07.12.2012

pawn Код:
public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script"); //change this.
   
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
   
    CreateObject(1442, 2841.42, -2537.80, 17.78, 0.00, 0.00, 0.00);
    CreateObject(1220, 2835.84, -2536.68, 17.46, 0.00, 0.00, 0.00);
    CreateObject(3092, 2839.97, -2540.00, 3092.00, 207.00, 251.00, 178.00);
    CreateObject(3092, 2840.10, -2537.42, 17.41, 84.00, 33.00, 0.00);
    CreateObject(3009, 2841.69, -2537.72, 16.84, 222.00, 207.00, 25.00);
    return 1;
}
example ^^


Re: How do I add these in game? - Guest9328472398472 - 07.12.2012

Add it somewhere under, public OnGameModeInit()

I would recommend you though converting it to a Dynamic Object for better quality and less resources/stress on the server. www.convertffs.com is a good site to use...


Re: How do I add these in game? - blackbhuta - 07.12.2012

The format is CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float: DrawDistance);

So, you can try like this:
CreateObject(1442, 2841.42, -2537.80, 17.78, 0.00, 0.00, 0.00, 200);

more info you can check this link:
https://sampwiki.blast.hk/wiki/CreateObject


Re: How do I add these in game? - Devilxz97 - 07.12.2012

https://sampforum.blast.hk/showthread.php?tid=282801
samp map editor ^^