sscanf help.
#2

At the end
pawn Код:
if(strcmp(item, "weapon") == 0)
{
    if(amount == 1) {
        if(CarInfo[car][vGun1] == 0) return SendClientMessage(playerid, COLOR_GREY, "* No weapon in Slot 1.");

        format(string, sizeof(string), "* %s takes a weapon from their car.", PlayerName(playerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

        new gunid = CarInfo[car][vGun1];

        CarInfo[car][vGun1] = 0;

        GivePlayerGun(playerid, gunid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "   You taken a weapon from Slot 1.");

    }
    if(amount == 2) {
        if(CarInfo[car][vGun2] == 0) return SendClientMessage(playerid, COLOR_GREY, "* No weapon in Slot 2.");

        format(string, sizeof(string), "* %s takes a weapon from their car.", PlayerName(playerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

        new gunid = CarInfo[car][vGun2];
        CarInfo[car][vGun2] = 0;

        GivePlayerGun(playerid, gunid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "   You taken a weapon from Slot 2.");

    }
    if(amount == 3) {
        if(CarInfo[car][vGun3] == 0) return SendClientMessage(playerid, COLOR_GREY, "* No weapon in Slot 3.");

        format(string, sizeof(string), "* %s takes a weapon from their car.", PlayerName(playerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

        new gunid = CarInfo[car][vGun3];

        CarInfo[car][vGun3] = 0;

        GivePlayerGun(playerid, gunid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "   You taken a weapon from Slot 3.");

    }
    else {
        SendClientMessage(playerid, COLOR_GREY, "* Usuage: /car get weapon [1 2 or 3]");
        return 1;
    }
    else return SendClientMessage(playerid, COLOR_GRAD3, "* Syntax: Get - cash pot crack mats weapon");

}


else return SendClientMessage(playerid, COLOR_GREY, "* Invalid syntax !");
return 1;
}
Reply


Messages In This Thread
sscanf help. - by Jack_Leslie - 21.10.2011, 10:45
Re: sscanf help. - by Kostas' - 21.10.2011, 10:57
Re: sscanf help. - by Jack_Leslie - 21.10.2011, 11:59
Re: sscanf help. - by SloProKiller - 21.10.2011, 12:06
Re: sscanf help. - by Jack_Leslie - 21.10.2011, 12:14
Re: sscanf help. - by Ensconce - 21.10.2011, 12:29
Re: sscanf help. - by Jack_Leslie - 21.10.2011, 12:37
Re: sscanf help. - by Ensconce - 21.10.2011, 12:43
Re: sscanf help. - by Jack_Leslie - 21.10.2011, 12:47

Forum Jump:


Users browsing this thread: 1 Guest(s)