26.02.2013, 16:32
(
Последний раз редактировалось Jstylezzz; 26.02.2013 в 18:24.
)
The right code would be:
This should work the way it's supposed to work..
EDIT: edited the code with RealCop's change and edited with FufLa's change, now it should work
pawn Код:
new objectid;//outside the command
if(!strcmp(cmdtext, "/test", true))
{
new vehicleid;
vehicleid=GetPlayerVehicleID(playerid);
if(Variable == 0)
{
objectid = CreateObject(18646,0,0,0,0,0,0);
AttachObjectToVehicle(objectid ,vehicleid, -0.034999, 1.749998, 0.329999, 0.000000, 0.000000, 0.000000); //Object Model: 18646 |
Variable = 1;
return 1;
}
else if(Variable == 1)
{
DestroyObject(objectid);
Variable = 0;
return 1;
}
return 1;
}
EDIT: edited the code with RealCop's change and edited with FufLa's change, now it should work