/sb won't wanna work anymore
#1

Hey,

I tried to make it only if someone is in a vehicle.

pawn Код:
command(sb, playerid, params[])
{
        new string[128];
        if(Player[playerid][Seatbelt] == 0)
        if(IsPlayerInAnyVehicle(playerid))
        {
            format(string, sizeof(string), "* %s has buckled up his seatbelt.", GetName(playerid));
            NearByMessage(playerid, NICESKY, string);
            Player[playerid][Seatbelt] = 1;
        }
    }
    else
    }
        if(Player[playerid][Seatbelt] == 1)
        if(IsPlayerInAnyVehicle(playerid))
        {
            format(string, sizeof(string), "* %s has unbuckle his seatbelt.", GetName(playerid));
            NearByMessage(playerid, NICESKY, string);
            Player[playerid][Seatbelt] = 0;
        }
    return 1;
}
and now it give these errors.

pawn Код:
C:\Users\Stefan Dorst\Desktop\Volcom Rp\gamemodes\SRP.pwn(15245) : error 010: invalid function or declaration
C:\Users\Stefan Dorst\Desktop\Volcom Rp\gamemodes\SRP.pwn(15247) : error 010: invalid function or declaration
C:\Users\Stefan Dorst\Desktop\Volcom Rp\gamemodes\SRP.pwn(15248) : error 010: invalid function or declaration
C:\Users\Stefan Dorst\Desktop\Volcom Rp\gamemodes\SRP.pwn(15251) : error 021: symbol already defined: "NearByMessage"
C:\Users\Stefan Dorst\Desktop\Volcom Rp\gamemodes\SRP.pwn(15254) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Also see this topic http://forum.sa-mp.com/showthread.ph...72#post1917672
Reply
#2

Why on Earth, would you post a second topic...

Please, please, please use the EDIT button.
Reply
#3

Quote:
Originally Posted by JhnzRep
Посмотреть сообщение
Why on Earth, would you post a second topic...

Please, please, please use the EDIT button.
Its not the same, this is about the /sb command itself the other is to put the player back into his vehicle.
Reply
#4

Still, please just edit your post..It's the same topic..
Reply
#5

Quote:

Dorst\Desktop\Volcom Rp\gamemodes\SRP.pwn(15254) : error 010: invalid function or declaration

Show which line is this..

- And You defined "NearByMessage" two times in your script.. It's not hard to read the error tho.
Reply
#6

pawn Код:
command(sb, playerid, params[])
{
    new string[128];
    if(Player[playerid][Seatbelt] == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            format(string, sizeof(string), "* %s has buckled up his seatbelt.", GetName(playerid));
            NearByMessage(playerid, NICESKY, string);
            Player[playerid][Seatbelt] = 1;
        }
    }
    else if(Player[playerid][Seatbelt] == 1)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            format(string, sizeof(string), "* %s has unbuckle his seatbelt.", GetName(playerid));
            NearByMessage(playerid, NICESKY, string);
            Player[playerid][Seatbelt] = 0;
        }
    }
    return 1;
}
Reply
#7

pawn Код:
format(string, sizeof(string), "* %s has unbuckled his seatbelt.", GetName(playerid));
Sorry, it just had to be done.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)