SupperRobin6394

Untitled

Dec 4th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.79 KB | None | 0 0
  1. COMMAND:rb(playerid,params[])
  2. {
  3.     if(RoadBlock[playerid] == 1)
  4.     {
  5.         SendClientMessage(playerid, COLOR_RED, "ERROR: You already placed a RoadBlock!");
  6.         return 1;
  7.     }
  8.     new Float:X, Float:Y, Float:Z,Float:Angle;
  9.     GetPlayerPos(playerid, X, Y, Z);
  10.     GetPlayerFacingAngle(playerid, Angle);
  11.     RoadBlockObject[playerid] = CreateObject(979, X+1, Y, Z-0.3, 0, 0, Angle);
  12.     RoadBlock[playerid] = 1;
  13.     SendClientMessage(playerid, COLOR_GREEN, "You placed the RoadBlock!");
  14.     return 1;
  15. }
  16.  
  17. COMMAND:drb(playerid,params[])
  18. {
  19.     if(RoadBlock[playerid] == 0)
  20.     {
  21.         SendClientMessage(playerid, COLOR_RED, "You did not place a RoadBlock!");
  22.         return 1;
  23.     }
  24.     RoadBlock[playerid] = 0;
  25.     DestroyObject(RoadBlockObject[playerid]);
  26.     SendClientMessage(playerid, COLOR_GREEN, "You removed the RoadBlock!");
  27.     return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment