hi,
kann mir einer helfen bei diesem Befehl:
if(strcmp(cmd, "/crb", true) == 0 || strcmp(cmd, "/createroadblock", true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid) || IsAFeuer(playerid) || IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /crb [Roadblock ID]");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Available Roadblocks:");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: kleine Sperre | 2: mittlere Sperre |");
SendClientMessage(playerid, COLOR_GRAD1, "| 3: große Sperre | 4: Cone | 5: Detour Sign |");
SendClientMessage(playerid, COLOR_GRAD1, "| 6: schild | 7: Straße gesperrt Schild |");
return 1;
}
new rb = strval(tmp);
if (rb == 1)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(1459,plocx,plocy,plocz,ploca);
format(string,sizeof(string),"[HQ]: Officer %s hat eine sperre erstellt, over.",sendername);
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Straßensperre ~b~erstellt!",3000,1);
return 1;
}
else if (rb == 2)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);
format(string,sizeof(string),"[HQ]: Officer %s hat eine sperre erstellt, over.",sendername);
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Straßensperre ~b~erstellt!",3000,1);
return 1;
}
else if (rb == 3)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);
format(string,sizeof(string),"[HQ]: Officer %s hat eine sperre erstellt, over.",sendername);
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);
return 1;
}
else if (rb == 4)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);
format(string,sizeof(string),"[HQ]: Officer %s hat eine sperre erstellt, over.",sendername);
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Cone ~g~Placed!",3000,1);
return 1;
}
else if (rb == 5)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);
format(string,sizeof(string),"[HQ]: Officer %s hat eine sperre erstellt, over.",sendername);
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
return 1;
}
else if (rb == 6)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);
format(string,sizeof(string),"[HQ]: Officer %s hat eine sperre erstellt, over.",sendername);
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
return 1;
}
else if (rb == 7)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);
format(string,sizeof(string),"[HQ]: Officer %s hat eine sperre erstellt, over.",sendername);
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
return 1;
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /createroadblock %d",d,m,y,h,mi,s,sendername, rb);
CommandLog(string);
}
return 1;
}
wie man die Straßensperre wieder entfernen kann?
danke im voraus