Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:rb(playerid,params[])
- {
- if(RoadBlock[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You already placed a RoadBlock!");
- return 1;
- }
- new Float:X, Float:Y, Float:Z,Float:Angle;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Angle);
- RoadBlockObject[playerid] = CreateObject(979, X+1, Y, Z-0.3, 0, 0, Angle);
- RoadBlock[playerid] = 1;
- SendClientMessage(playerid, COLOR_GREEN, "You placed the RoadBlock!");
- return 1;
- }
- COMMAND:drb(playerid,params[])
- {
- if(RoadBlock[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "You did not place a RoadBlock!");
- return 1;
- }
- RoadBlock[playerid] = 0;
- DestroyObject(RoadBlockObject[playerid]);
- SendClientMessage(playerid, COLOR_GREEN, "You removed the RoadBlock!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment