Road Block Help
#1

pawn Код:
CMD:roadblock(playerid,params[])
{
        new number, atrb = atblock[playerid],string[600];
        if(sscanf(params,"d",number))
        {
            SendClientMessage(playerid,COLOR_BLUE,"USAGE: /roadblock <1/2/3/4/5/6/7>");
            SendClientMessage(playerid,COLOR_BLUE,"| 1: Small Roadblock");
            SendClientMessage(playerid,COLOR_BLUE,"| 2: Medium Roadblock");
            SendClientMessage(playerid,COLOR_BLUE,"| 3: Big Roadblock");
            SendClientMessage(playerid,COLOR_BLUE,"| 4: Traffic cone");
            SendClientMessage(playerid,COLOR_BLUE,"| 5: Detour sign");
            SendClientMessage(playerid,COLOR_BLUE,"| 6: Will be sign");
            SendClientMessage(playerid,COLOR_BLUE,"| 7: Line closed sign");
            SendClientMessage(playerid,COLOR_WHITE,"----------------------");
            return 1;
        }
        switch(number)
        {
            case 1:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(1459, X, Y+1, Z-0.5,0,0,A);
                        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
                    }
                    else
                    {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
            case 2:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(978, X, Y+1, Z,0,0,A);
                        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
                    } else {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
            case 3:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(981, X, Y+1, Z,0,0,A);
                        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
                    }
                    else
                    {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
            case 4:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(1238, X, Y+1, Z-0.5, 0, 0.0,A);
                        GameTextForPlayer(playerid,"~w~Cone ~b~Placed!",3000,1);
                    }
                    else
                    {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
            case 5:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(1425, X, Y+1, Z-0.5, 0, 0.0,A,300);
                        GameTextForPlayer(playerid,"~w~Sign ~b~Placed!",3000,1);
                    }
                    else
                    {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
            case 6:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(3265, X, Y+1, Z-0.9, 0, 0.0,A);
                        GameTextForPlayer(playerid,"~w~Sign ~b~Placed!",3000,1);
                    }
                    else
                    {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
            case 7:
            {
                    new Float:X, Float:Y, Float:Z, Float:A;
                    GetPlayerPos(playerid, X, Y, Z);
                    GetPlayerFacingAngle(playerid, A);
                    if(atblock[playerid] < MAX_ROADBLOCKS)
                    {
                        block[atrb][playerid] = CreateObject(3091, X, Y+1, Z-0.25, 0, 0.0,A);
                        GameTextForPlayer(playerid,"~w~Sign ~b~Placed!",3000,1);
                    }
                    else
                    {
                        format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
                        SendClientMessage(playerid, COLOR_RED, string);
                    }
                    return 1;
            }
        }
        return 1;
}

Errors Given
pawn Код:
C:\Users\Ultra-Gaming\Desktop\Server\gamemodes\UG-LVRP.pwn(699) : error 075: input line too long (after substitutions)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Which line is 699
Reply
#3

Fixed it NM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)