29.09.2013, 14:09
why /removerb only removes the last roadblock that player created and it doesn't remove other roadblocks?
pawn Код:
CMD:roadblock(playerid, params[])
{
new Float:x, Float:y, Float:z,Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
CreateRoadBlock[playerid] = 1;
SendClientMessage(playerid, COLOR_GREEN, "Roadblock Created, remove it using /removerb");
PlayerRB[playerid] = CreateObject(978, x, y, z, 0.0, 0.0, angle);
return 1;
}
CMD:removerb(playerid, params[])
{
CreateRoadBlock[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Roadblock Removed");
DestroyObject(PlayerRB[playerid]);
return 1;
}