Advertisement
Guest User

heatON

a guest
Dec 21st, 2008
668
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. new Block[MAX_PLAYERS];//la inceput sub #include <a_samp>
  2. new HasBlock[MAX_PLAYERS];//la inceput sub #include <a_samp>
  3.  
  4.  
  5. if(strcmp(cmdtext, "/roadblock", true)==0)
  6. {
  7. if(HasBlock[playerid] == 1)
  8. {
  9. SendClientMessage(playerid, COLOR, "You already have a road block, type /removeroadblock");
  10. return 1;
  11. }
  12. new Float:X, Float:Y, Float:Z, Float:A;
  13. GetPlayerPos(playerid, X, Y, Z);
  14. GetPlayerFacingAngle(playerid, A);
  15. CreateObject(981, X, Y, Z, 0.0, 0.0, A);
  16. HasBlock[playerid] = 1;
  17. Block[playerid] = CreateObject(model, x, y, z, rx, ry, rz);
  18. SendClientMessage(playerid, COLOR_GREEN, "RoadBlock Successfully Deployed");
  19. return 1;
  20. }
  21.  
  22. if(strcmp(cmdtext, "/removeroadblock", true)==0)
  23. {
  24. if(HasBlock[playerid] == 0)
  25. {
  26. SendClientMessage(playerid, COLOR_GREEN, "You don't have a roadblock.");
  27. return 1;
  28. }
  29. DestroyObject(Block[playerid], X, Y, Z, rX, rY, rZ);
  30. HasBlock[playerid] = 0;
  31. SendClientMessage(playerid, COLOR_GREEN, "RoadBlock Successfully Removed");
  32. return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement