11.03.2011, 20:34
I put some codes in my script and they dont work. They wont print strings or attach the 3d text or anything!
Thats an example, its supposed to log when the vehicle spawns or dies, and put a 3d text above it saying Bus: idhere
What did i do wrong?
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new string[100], carstring[100];
format(carstring,sizeof(carstring),"Bus %d",vehicleid);
cartext[vehicleid] = Create3DTextLabel(carstring,COLOR_YELLOW,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToVehicle(cartext[vehicleid], vehicleid, 0.0, 0.0, 2.0);
format(string,sizeof(string),"Vehicle %d has spawned!", vehicleid);
print(string);
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
new string[100];
format(string,sizeof(string),"Vehicle %d has died!", vehicleid);
Delete3DTextLabel(nametext[vehicleid]);
print(string);
return 1;
}
What did i do wrong?