new ocjects wont work - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: new ocjects wont work (
/showthread.php?tid=194823)
new ocjects wont work -
legodude - 30.11.2010
when i do:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tazer", cmdtext, true, 10) == 0)
{
SetPlayerAttachedObject(playerid,5, 18642, 2);
return 1;
}
return 0;
}
and then ingame i do /tazer
nothing happens..
helpiee
Re: new ocjects wont work -
kurta999 - 30.11.2010
5rd slot didn't exist. ( 0 - 4 )
Change the 5rd slot to 4..
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tazer", cmdtext, true, 10) == 0)
{
SetPlayerAttachedObject(playerid, 4, 18642, 2);
return 1;
}
return 0;
}
Re: new ocjects wont work -
legodude - 30.11.2010
pawn Код:
for(new i=0;i<MAX_VEHICLES;i++)
{
AttachObjectToVehicle(18647, i, 3, 0.0, 1.0, 0.0, 0.0, 0.0);
}
won't work either!
Re: new ocjects wont work -
Vince - 30.11.2010
You need to create the object first, and then use its id in the function.
pawn Код:
new object = CreateObject(blahblah);
AttachObjectToVehicle(object, vehicle, blahblah);
Re: new ocjects wont work -
legodude - 01.12.2010
ahaah. lol didnt seem to get that part XD