12.04.2010, 20:05
I have a problem i think the command gets bugged because if you tipe /rb when you are a cop the road block doesn't appear ! Can you help me ? Here is the command :
If you need something else please tell me !
Edit : the roadblock sometime appears like first time you tipe /rb but then it doesn't appear anymore !
Код:
if(strcmp(cmd, "/rb", true) == 0 || strcmp(cmd, "/roadblock", true) == 0)
{
if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1)
{
if(RoadblockUsed[playerid] == 0)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
PlayerRoadblock[playerid] = CreateObject(981, x, y, z, 0.0, 0.0, a+180.0);
SendClientMessage(playerid, COLOR_YELLOW,"Roadblock has been created on this location.");
SetPlayerPos(playerid, x, y, z+5.0);
format(string, sizeof(string), "Officer %s: I have deployed a roadblock, Over.", PlayerName[playerid]);
SendTeamMessage(TEAM_COP, COLOR_BLUE, string);
RoadblockUsed[playerid] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED,"You have already created a roadblock, use /rrb to delete it.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops team.");
}
return 1;
}
Edit : the roadblock sometime appears like first time you tipe /rb but then it doesn't appear anymore !

