Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Block[MAX_PLAYERS];//la inceput sub #include <a_samp>
- new HasBlock[MAX_PLAYERS];//la inceput sub #include <a_samp>
- if(strcmp(cmdtext, "/roadblock", true)==0)
- {
- if(HasBlock[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR, "You already have a road block, type /removeroadblock");
- return 1;
- }
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- CreateObject(981, X, Y, Z, 0.0, 0.0, A);
- HasBlock[playerid] = 1;
- Block[playerid] = CreateObject(model, x, y, z, rx, ry, rz);
- SendClientMessage(playerid, COLOR_GREEN, "RoadBlock Successfully Deployed");
- return 1;
- }
- if(strcmp(cmdtext, "/removeroadblock", true)==0)
- {
- if(HasBlock[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "You don't have a roadblock.");
- return 1;
- }
- DestroyObject(Block[playerid], X, Y, Z, rX, rY, rZ);
- HasBlock[playerid] = 0;
- SendClientMessage(playerid, COLOR_GREEN, "RoadBlock Successfully Removed");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement