Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. CMD:vtext(playerid,params[])
  2. {
  3. new testo[128];
  4. if(sscanf(params,"s[128]", testo)) return SendClientMessage(playerid, 0x800000C6, "Usa: /vtext <testo>");
  5. new vehicleid = GetPlayerVehicleID(playerid);
  6. if(GetVehicleModel(vehicleid)==596)
  7. {
  8. if(vehtext[playerid]==0)
  9. {
  10. vehtext[playerid]=1;
  11. objectv[vehicleid] = CreateObject(19477, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  12. AttachObjectToVehicle(objectv[vehicleid], vehicleid, 0.0, -1.0, 0.798, 0.0, -90.0, -90.0);
  13. SetObjectMaterialText(objectv[vehicleid], testo, 0, OBJECT_MATERIAL_SIZE_256x128,\
  14. "Arial", 60, 1, 0xFF000000, 0x000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  15. }
  16. else if (GetVehicleModel(vehicleid) !=596)
  17. {
  18. if(vehtext[playerid]==0)
  19. {
  20. vehtext[playerid]=1;
  21. objectv[vehicleid] = CreateObject(19477, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  22. AttachObjectToVehicle(objectv[vehicleid], vehicleid, 1.153, -1.2, 0.46, 0.0, 0.0, 0.0);
  23. SetObjectMaterialText(objectv[vehicleid], testo, 0, OBJECT_MATERIAL_SIZE_256x128,\
  24. "Arial", 60, 1, 0xFF000000, 0x000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  25. }
  26. }
  27. else if(!sscanf(params,"s[128]", testo) && vehtext[playerid]==1)
  28. {
  29. vehtext[playerid]=1;
  30. if (IsValidObject(objectv[vehicleid]) DestroyObject(objectv[vehicleid]);
  31. SendClientMessage(playerid, 0x800000C6, "Non puoi utilizzare 2 vtext!");
  32. }
  33. return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement