[Pomoc]Prodajigracu

Započeo CodeMan, Avgust 04, 2011, 08:48:49 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:PG
Opis problema:Htio bih napraviti komandu /v prodajigracu ali neznam kako da to izvedem,moze li mi neko objasniti?
Dio Skripte:else if(strcmp(x_nr,"sellto",true) == 0)
        {
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])
{
    new ownvehkey;
                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { ownvehkey = PlayerInfo[playerid][pPcarkey]; }
                else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; }
                else { return 1; }
    if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0)
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
    SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [ID/Dio Imena] [Cijena]");
    return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
    if(ProxDetectorS(8.0, playerid, giveplayerid))
        {
    if(PlayerInfo[giveplayerid][pPcarkey] == 9999)
    {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [ID/Dio Imena] [Cijena]");
                return 1;
            }
            new price;
            price = strval(tmp);
            if(price < 1 || price > 1500000)
            {
                SendClientMessage(playerid, COLOR_GREY, "  Price not lower then 1 and not higher then 1500000. ");
                return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        format(string, sizeof(string), "* You offerd %s to buy your car for $%d .", giveplayer, price);
        SendClientMessage(playerid, COLOR_WHITE, string);
        format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (type /accept ownablecar) to buy.", playername, price);
        SendClientMessage(giveplayerid, COLOR_WHITE, string);
        OwnableCarOffer[giveplayerid] = playerid;
        OwnableCarID[giveplayerid] = ownvehkey;
        OwnableCarPrice[giveplayerid] = price;
        return 1;
        }
    }
else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Player is not near you ! ");
        return 1;
    }
}
}
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "  This is not your car");
        return 1;
    }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  You have to sit at your own car to sell it");
    return 1;
}
        }
Ovo je komanda sellto iz ravensa



a odkud mi znamo kako je kod tebe enum definiran ?  :-[
Ping | Need For Speed - Progres
OwnerShip 100 % | Reg/Log sistem 100 % | Admin + GameMaster sistem 100 % | Bande 100 % | Poslovi 100 % | Eventi 0 % | Sistem Duel za Gunove 100 % | Sistem Duel Race 100 % | Tuning Sistem 15 % | Shop sistem 0 %
Potrebni Mapperi za Ping posebno za NFS i FR mod
Prijavnica :
Nick na forumu ( Ping forumu ) :
Za koji mod zelite mappat ( mozemo se bazirat samo za jedan a mozete za oba ) :
Sto zelite kao nagradu :

Pa ova komanda ti je napravljena, samo ti jos treba /accept ownablecar..
Aequam memento rebus in arduis servare mentem.