Object Help
#1

i watch wiki sa-mp
i code my own code
this is my code
new object;
public onplayergamemodeinit()
{
object = CreateObject(19360, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
}
cmd:test(playerid, params[])
{
EditObject(playerid, objecthouse);
SendClientMessageEx(playerid, COLOR_GRAY, "TESTING");
return 1;
}
i complie success, but i join game i use and no happened
please help me
my english bad, sorry
Reply
#2

You made some mistakes..

PHP код:
public OnGameModeInIt()
{
object CreateObject(193600.00.00.00.00.00.0);
}
cmd:test(playeridparams[])
{
EditObject(playeridobject);
SendClientMessageEx(playeridCOLOR_GRAY"TESTING");
return 
1;

You made the player edit the object called "objecthouse" not "object".. So you should do it like that ^^,
Also you made another mistake.. You created the object under something called "onplayergamemodeinit", That's wrong, You must use OnGameModeInIt.. so the object will spawn... You'll find OnGameModeInIt already there in your script.. just put the line
PHP код:
object CreateObject(193600.00.00.00.00.00.0); 
anywhere under it.. and don't forget to put the
PHP код:
new object
on top of the script under the includes..
Reply
#3

i put the Createobject to ongamemodeinit
but won't work
Reply
#4

i put to the ongamemodeinit
won't work
Reply
#5

Put This OnGamemodeinit
PHP код:
public OnGameModeInIt()
{
object CreateObject(193600.00.00.00.00.00.0);

and then this is kind of define put on the top

PHP код:
new object
Now Paste this as a separate place not in the ongamemodeinit lol empty place

PHP код:
cmd:test(playeridparams[])
{
EditObject(playeridobject);
SendClientMessageEx(playeridCOLOR_GRAY"TESTING");
return 
1;



Look Like This
PHP код:
new object
PHP код:
public OnGameModeInIt() 

object CreateObject(193600.00.00.00.00.00.0); 

PHP код:
cmd:test(playeridparams[]) 

EditObject(playeridobject); 
SendClientMessageEx(playeridCOLOR_GRAY"TESTING"); 
return 
1

Reply
#6

bro, won't work
i put to OnGameModeInit. createobject and i do what your said
but i use /test don't show object
Reply
#7

Yes,i do all but won't work
Reply
#8

Can you show us your current code?
Reply
#9

Quote:

new object
public OnGameModeInIt()
{
object = CreateObject(19360, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
}
cmd:test(playerid, params[])
{
EditObject(playerid, object);
SendClientMessageEx(playerid, COLOR_GRAY, "TESTING");
return 1;
}

This is my code, i compile success but i use cmd /test, nothing show up, just show the cursor
Reply
#10

You wrote "OnGamemodeInIt".

pawn Код:
new object;

public OnGameModeInit()
{
    object = CreateObject(19360, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    return 1;
}

cmd:test(playerid, params[])
{
    EditObject(playerid, object);
    SendClientMessageEx(playerid, COLOR_GRAY, "TESTING");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)