Percent on planting
#6

Just put it at the end of the command

pawn Код:
CMD:pickweed(playerid, params[]) {
    if(GetPlayerVehicleID(playerid)) {
        return SendClientMessage(playerid,-1,"You need to be on foot to pick your weed.");
    }
    new
        i = -1
    ;
    while(++i < MAX_WEED) {
        if(IsPlayerInRangeOfPoint(playerid,2.5,winfo[i][poswx],winfo[i][poswy],winfo[i][poswz]-1)) {
            break;
        }
    }
    if(i == MAX_WEED) {
        return SendClientMessage(playerid,-1,"You need to be next to a fully grown weed.");
    }
    if(winfo[i][finished] == 0) {
        return SendClientMessage(playerid,-1,"Your weed is not fully grown yet.");
    }
    switch(random(100)) {
        case 0..4: {} // AK-47
        case 5..14: {} // Bubblegum
        case 15..29: {} // Super
        case 30..49: {} // Skunk
        default: pinfo[playerid][weed] = pinfo[playerid][weed] + 5;
    }
    DestroyDynamic3DTextLabel(winfo[i][labelweed]);
    DestroyDynamicObject(mariaobject[i]);
    limit--;

    return true;
}
Reply


Messages In This Thread
Percent on planting - by Zens - 24.04.2014, 14:46
AW: Percent on planting - by Nero_3D - 24.04.2014, 18:13
Re: AW: Percent on planting - by Zens - 24.04.2014, 20:17
AW: Percent on planting - by Nero_3D - 24.04.2014, 20:22
Re: AW: Percent on planting - by Zens - 24.04.2014, 21:29
AW: Percent on planting - by Nero_3D - 25.04.2014, 12:32
Re: Percent on planting - by Zens - 25.04.2014, 14:27
Re: Percent on planting - by Zens - 28.04.2014, 18:48
AW: Percent on planting - by Macronix - 28.04.2014, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)