AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
ZayanImran - 25.01.2013
i putted attachobjecttovehicle in a command and then when i am in a leviathan, i type /tieboard, then it dosent appear D: and when i am in a leviathan it says "You must be in a leviathan to use this command." but it should not say that D:
plz fix the code
Код:
COMMAND:tieboard(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetVehicleModel(417)) // THIS IS FOR LEVIATHAN (HELI)
{
new myobject1 = CreateObject(3117,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(myobject1, 417, -4.425000,0.524999,0.075000,0.000000,0.000000,0.000000);
new myobject2 = CreateObject(3117,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(myobject2, 417, 4.200001,0.000000,0.000000,0.000000,0.000000,0.000000);
}
else SendClientMessage(playerid, COLOR_RED, "You must be in a leviathan to use this command.");
}
else SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle.");
return 1;
}
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||
i dont know what is the code to hide the player name
if someone types /stealth it should hide his dot on the map and his name
plz help me with /stealth.
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
Babul - 25.01.2013
change
Код:
if(GetVehicleModel(417))
to
Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid))==417)
...also its a bad idea to store the created objects' id in a locally declared variable (myobject1 and 2). the object id will be missing - declare it global, like
Код:
new myobject1[MAX_PLAYERS];
new myobject2[MAX_PLAYERS];
in the top part of the script indeed...
the myobject1 (and 2) need the [playerid] now, to store the index of the objectid, you might need that id later
oops, i forgot to give an example:
Код:
new myobject1[playerid] = CreateObject(your stuff here);
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
ZayanImran - 25.01.2013
just fix the command for me and give it here plz
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
arakuta - 25.01.2013
Quote:
Originally Posted by ZayanImran
just fix the command for me and give it here plz
|
Are you kidding me? Babul actually fixed your command.
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
ZayanImran - 25.01.2013
where will i put the
new myobject1[MAX_PLAYERS];
new myobject2[MAX_PLAYERS];
&
new myobject1[playerid] = CreateObject(your stuff here);
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
JaKe Elite - 25.01.2013
I don't know but.
Is it just me or everyone?
Is the code you gave is a copy/paste?
Try to learn scripting..
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
ZayanImran - 25.01.2013
i am new.
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
ZayanImran - 25.01.2013
ohh thanks i fixed it.
Re: AttachObjectToVehicle (object dosent appear) | i want to make a /stealth cmd -
ZayanImran - 27.01.2013
shit shit shit, the object do not appear -,-