3D Plates on vehicles, how to?
#9

sorry for double post, but is it possible to add that function in OnPlayertCommandText()

something like this
Код:
if(strcmp(cmd, "/addvehicle", true) == 0){
 new addmodelid, color1, color2, addtmp[256], addquery[512];
 new Float:x, Float:y, Float:z, Float:Angle;
 if(PlayerInfo[playerid][AdminLevel] < 10){
  SendClientMessage(playerid, COLOR_RED, "You must be server administrator if you want to add faction car.");
  return 1;
 }
 addtmp = strtok(cmdtext, idx);
	
 if(!strlen(addtmp)){
  SendClientMessage(playerid, COLOR_GREY, "USAGE: /addvehicle [model_id] [color1] [color2]");
  return 1;
 }
 addmodelid = strval(addtmp);
	
 addtmp = strtok(cmdtext, idx);

 if(!strlen(addtmp)){
  SendClientMessage(playerid, COLOR_GREY, "USAGE: /addvehicle [model_id] [color1] [color2]");
  return 1;
 }
 color1 = strval(addtmp);

 addtmp = strtok(cmdtext, idx);
	
 if(!strlen(addtmp)){
  SendClientMessage(playerid, COLOR_GREY, "USAGE: /addvehicle [model_id] [color1] [color2]");
  return 1;
 }
 color2 = strval(addtmp);
 GetPlayerPos(playerid, x, y, z);
 GetPlayerFacingAngle(playerid, Angle);
 format(addquery, sizeof(addquery), "INSERT INTO static_vehicles (model_id, x, y, z, angle, color1, color2) VALUES (%d, %f, %f, %f, %f, %d, %d)", addmodelid, x, y, z, Angle, color1, color2);
 mysql_query(addquery);
 wait(3);
 new vehid, message[128];
 vehid = CreateVehicle(addmodelid, x, y, z, Angle, color1, color2, 600);
 format(message,sizeof(message), "SA-%i-LS", vehid);
 VehicleLicense[vehid] = Create3DTextLabel(message, COLOR_LIGHTBLUE, 0.0, 0.0, 0.0, 25.0, GetVehicleVirtualWorld(vehid), 1);
 Attach3DTextLabelToVehicle(VehicleLicense[vehid], vehid, 0.0, -2.0, 0.0);
 return 1;
}
it is not working i dont know why
Reply


Messages In This Thread
3D Plates on vehicles, how to? - by Ihsan_Cingisiz - 30.05.2010, 20:31
Re: 3D Plates on vehicles, how to? - by Conroy - 30.05.2010, 20:44
Re: 3D Plates on vehicles, how to? - by Aleksandar_Zivanovci - 30.05.2010, 20:48
Re: 3D Plates on vehicles, how to? - by Aleksandar_Zivanovci - 30.05.2010, 20:58
Re: 3D Plates on vehicles, how to? - by Conroy - 30.05.2010, 21:00
Re: 3D Plates on vehicles, how to? - by Aleksandar_Zivanovci - 30.05.2010, 21:01
Re: 3D Plates on vehicles, how to? - by ReVo_ - 30.05.2010, 21:01
Re: 3D Plates on vehicles, how to? - by Aleksandar_Zivanovci - 30.05.2010, 21:05
Re: 3D Plates on vehicles, how to? - by Aleksandar_Zivanovci - 30.05.2010, 21:55
Re: 3D Plates on vehicles, how to? - by Conroy - 30.05.2010, 21:57

Forum Jump:


Users browsing this thread: 3 Guest(s)