How do I add these in game?
#1

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);
Reply
#2

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
}
Reply
#3

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 ^^
Reply
#4

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...
Reply
#5

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
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)