06.04.2013, 21:03
i tried to make /roadblock package for cops but when i compile
here are the scripts
pawno code
Код:
(18303) : error 012: invalid function call, not a valid address (18303) : warning 215: expression has no effect (18303) : warning 215: expression has no effect (18303) : warning 215: expression has no effect (18303) : warning 215: expression has no effect (18303) : warning 215: expression has no effect (18303) : error 001: expected token: ";", but found ")" (18303) : error 029: invalid expression, assumed zero (18303) : fatal error 107: too many error messages on one line
pawno code
pawn Код:
CMD:roadblock(playerid, params[])
return cmd_rb(playerid, params);
CMD:rb(playerid, params[])
{
new CreateRoadblock;
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
new rb = strval(params);
new sendername[ MAX_PLAYER_NAME ];
new string[250];
if(GetTeam{playerid} == CLASS_COPS || GetTeam{playerid} == CLASS_SWAT || GetTeam{playerid} == CLASS_FBI)
{
if (isnull(params))
{
SendClientMessage(playerid, RED, "USAGE: /rb [Roadblock ID]");
SendClientMessage(playerid, LIGHTBLUE, "Available Roadblocks:");
SendClientMessage(playerid, WHITE, "| 1: Small Roadblock | 2: Medium Roadblock |");
SendClientMessage(playerid, WHITE, "| 3: Big Roadblock | 4: Cone | 5: Detour Sign |");
SendClientMessage(playerid, WHITE, "| 6: Will Be Sign | 7: Line Closed Sign |");
return 1;
}
if (rb == 1)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
GetPlayerPos(playerid, plocx, plocy, plocz);
CreateRoadblock(1459,plocx,plocy,plocz,ploca);//line 18303
GetPlayerFacingAngle(playerid,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(1) at his position, over.",sendername);
CopRadio(BLUE, fstr);
GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
return 1;