- 0
Problema Warrings
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
DaNNer
Am un gm si pupa ceva timp de lucrat in el am urmatoarele Warringuri. stiu ca nu afecteaza dar eu am mania de a avea gm-ul curat fara Errors si fara Warrings.
Majoritatea Warringurilor sunt de la o comanda /crb
[pawn]if(strcmp(cmd, "/crb", true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid) || IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /crb [iD]");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Baricazi avizibile:");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: Pancarda Mica");
SendClientMessage(playerid, COLOR_GRAD1, "| 2: Parapet");
SendClientMessage(playerid, COLOR_GRAD1, "| 3: Baricada Mare");
SendClientMessage(playerid, COLOR_GRAD1, "| 3: Con");
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);
CreateObject(1459,plocx,plocy,plocz,ploca);
format(string,sizeof(string),"[Atentie]: Ofiterul %s a montat Baricada(1) pe locul in care se afla, over.",(playerid));
SendRadioMessage(1,COLOR_LIGHTBLUE,string);
GameTextForPlayer(playerid,"~w~Baricada ~b~Montata!",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);
CreateObject(978,plocx,plocy,plocz+0.6,ploca);
format(string,sizeof(string),"[Atentie]: Ofiterul %s a montat Baricada(2) pe locul in care se afla, over.",(playerid));
SendRadioMessage(1,COLOR_LIGHTBLUE,string);
GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",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);
CreateObject(981,plocx,plocy,plocz+0.9);
format(string,sizeof(string),"[Atentie]: Ofiterul %s a montat Baricada(3) pe locul in care se afla, over.",(playerid));
SendRadioMessage(1,COLOR_LIGHTBLUE,string);
GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);
SetPlayerPos(playerid, plocx, plocy+1.3, plocz);
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);
CreateObject(1238,plocx,plocy,plocz+0.2,ploca);
format(string,sizeof(string),"[Atentie]: Ofiterul %s a montat Baricada(4) pe locul in care se afla, over.",(playerid));
SendRadioMessage(1,COLOR_LIGHTBLUE,string);
GameTextForPlayer(playerid,"~w~Cone ~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(1425,plocx,plocy,plocz+0.6,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Detour Sign(4) at his position, over.",(playerid));
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Sign ~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(3265,plocx,plocy,plocz-0.5,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Will Be Sign(5) at his position, over.",(playerid));
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(3091,plocx,plocy,plocz+0.5,ploca+180);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Line Closed Sign(6) at his position, over.",(playerid));
SendRadioMessage(1,COLOR_BLUE,string);
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
return 1;
}*/
}
return 1;
}
else if (strcmp(cmd,"/rrb",true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid) || IsPlayerAdmin(playerid))
{
DeleteClosestRoadblock(playerid);
format(string,sizeof(string),"[HQ]: Officer %s has removed a Roadblock, over.",(playerid));
SendRadioMessage(1,COLOR_LIGHTBLUE,string);
GameTextForPlayer(playerid,"~w~Roadblock ~r~Removed!",3000,1);
}
return 1;
}
else if (strcmp(cmd,"/rrball",true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid) || IsPlayerAdmin(playerid))
{
if(PlayerInfo[playerid][pRank] >= 6 || IsPlayerAdmin(playerid)) // This being the default Chief rank in LA-RP change if neccesary.
{
DeleteAllRoadblocks(playerid);
format(string,sizeof(string),"[HQ]: Officer %s has removed all Roadblocks in the area, over.",(playerid));
SendRadioMessage(1,COLOR_LIGHTBLUE,string);
GameTextForPlayer(playerid,"~b~All ~w~Roadblocks ~r~Removed!",3000,1);
}
}
return 1;
}[/pawn]
Iar primul Warring este de al coamnda /asellcar
[pawn]if(!strcmp(cmdtext, "/asellcar", true))
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SCM(playerid, COLOR_GREY, " You need to login first !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
new vehid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
new Float:x,Float:y,Float:z;
new Float:a;
CarInfo[vehid][cOwned] = 0;
strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~w~You have admin sold the vehicle", 10000, 3);
GetVehiclePos(vehid, x, y, z);
GetVehicleZAngle(vehid, a);
CarInfo[vehid][cLocationx] = x;
CarInfo[vehid][cLocationy] = y;
CarInfo[vehid][cLocationz] = z;
CarInfo[vehid][cAngle] = a;
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
OnPropUpdate();
DestroyVehicle(vehid);
CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle]);
format(string, sizeof(string), "[AdmWarning]: %s a folosit comanda /asellcar.",playername);
ABroadCast(COLOR_LIGHTRED,string, 5);
return 1;
}
else
{
SCM(playerid, COLOR_GREY, " You're not authorized to use that command !");
return 1;
}
}
return 1;
}[/pawn]
Mai exact de la linia [pawn]CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle]);[/pawn]
0 answers to this question
Recommended Posts