Checking command
#1

Can someone please check this command, sometimes it works, but also sometimes its returning that this command does not exist, so does anyone see the problem ?

pawn Код:
CMD:v(playerid, params[])
{
    if(PI[playerid][Auto] == -1 && PI[playerid][Auto2] == -1 && PI[playerid][Auto3] == -1) return SCM(playerid, ERRORCOLOR, "[ERROR]: You dont own a vehicle.");

    new autoid1 = PI[playerid][Auto],
        autoid2 = PI[playerid][Auto2],
        autoid3 = PI[playerid][Auto3],
        str1[64], str2[64], str3[64], finalprikaz[256];

    if(autoid1 == -1) { format(str1, sizeof(str1), "Empty Slot"); }
    else if(autoid1 != -1) { format(str1, sizeof(str1), "%s", ImenaVozila[VInfo[autoid1][Model] - 400]); }

    if(autoid2 == -1) { format(str2, sizeof(str2), "Empty Slot"); }
    else if(autoid2 != -1) { format(str2, sizeof(str2), "%s", ImenaVozila[VInfo[autoid2][Model] - 400]); }

    if(autoid3 == -1) { format(str3, sizeof(str3), "Empty Slot"); }
    else if(autoid3 != -1) { format(str3, sizeof(str3), "%s", ImenaVozila[VInfo[autoid3][Model] - 400]); }

    format(finalprikaz, sizeof(finalprikaz), "%s\n%s\n%s", str1, str2, str3);

    SPD(playerid, DIALOG_VIZBOR, DIALOG_STYLE_LIST, "Choose your vehicle", finalprikaz, "Choose", "Exit");
    return 1;
}
Reply


Messages In This Thread
Checking command - by ShoortyFl - 25.04.2016, 16:58
Re: Checking command - by oMa37 - 25.04.2016, 17:10
Re: Checking command - by Crayder - 25.04.2016, 17:47
Re: Checking command - by povargek - 25.04.2016, 18:15
I am at the moon - by thaKing - 25.04.2016, 18:27
Re: Checking command - by Crayder - 25.04.2016, 20:15

Forum Jump:


Users browsing this thread: 3 Guest(s)