new ocjects wont work
#1

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

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

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

You need to create the object first, and then use its id in the function.
pawn Код:
new object = CreateObject(blahblah);
AttachObjectToVehicle(object, vehicle, blahblah);
Reply
#5

ahaah. lol didnt seem to get that part XD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)