Comand help
#1

Ok guys, this command
Код:
CMD:skiptut(playerid, params[])
{
if(pInTut[playerid] == 1)
{
SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
SetPlayerFacingAngle(playerid, 274.1669);
SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to CityHall as the tutorial is bugged.");
}
else
{
SendClientMessage(playerid,COLOR_RED, "You are not in a tutorial that you can skip!");
}
return 1;
it just keeps saying that you aren't in a tut that you can skip, and I was in the tutorial
Reply
#2

I am not sure about this
pawn Код:
CMD:skiptut(playerid, params[])
{
    if(pInTut[playerid] == 1) {
        SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
        SetPlayerFacingAngle(playerid, 274.1669);
        SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to CityHall as the tutorial is bugged.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "You are not in a tutorial that you can skip!");
}
Reply
#3

Код:
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(10842) : warning 209: function "cmd_skiptut" should return a value
Reply
#4

Make sure when you type the command your pInTut variable is equal to 1 -
pawn Код:
CMD:skiptut(playerid, params[])
{
    if ( pInTut[ playerid ] == 1) {
        SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
        SetPlayerFacingAngle(playerid, 274.1669);
        SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to CityHall as the tutorial is bugged.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "You are not in a tutorial that you can skip!");
   
    return 1;
}
Reply
#5

pawn Код:
CMD:skiptut(playerid, params[])
{
if(pInTut[playerid] == 1)
{
SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
SetPlayerFacingAngle(playerid, 274.1669);
SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to CityHall as the tutorial is bugged.");
}
else
{
SendClientMessage(playerid,COLOR_RED, "You are not in a tutorial that you can skip!");
}
return 1;
}
Reply
#6

Quote:
Originally Posted by Jordiee
Посмотреть сообщение
Код:
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(10842) : warning 209: function "cmd_skiptut" should return a value
Whoops! I forgot to return it.
Reply
#7

still says it :/
Reply
#8

I tested it and compiles for me without errors/warnings.
pawn Код:
CMD:skiptut(playerid, params[])
{
    if (pInTut[playerid] == 1) {
        SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
        SetPlayerFacingAngle(playerid, 274.1669);
        SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to CityHall as the tutorial is bugged.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "You are not in a tutorial that you can skip!");
    return 1;
}
Reply
#9

I don't see anything wrong, are you sure pInTut variable is equal to 1 when you type the command?
pawn Код:
CMD:skiptut(playerid, params[])
{
    printf("pInTut = %d", pInTut[ playerid ] );
   
    if ( pInTut[ playerid ] == 1) {
        SetPlayerPos(playerid, -201.4800, 1121.3499, 19.7422);
        SetPlayerFacingAngle(playerid, 274.1669);
        SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to CityHall as the tutorial is bugged.");
    }
    else return SendClientMessage(playerid,COLOR_RED, "You are not in a tutorial that you can skip!");
   
    return 1;
}
See the output.
Reply
#10

still says im not in a tut that I can't skip.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)