SA-MP Forums Archive
Need help!! [+REP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help!! [+REP] (/showthread.php?tid=373227)



Need help!! [+REP] - Shayaziz - 29.08.2012

When someone try to sell a car to someone else you can offer the other player to buy the car but the player cannot /accept ownablecar so i come here for your help!

pawn Код:
if(PlayerInfo[giveplayerid][pPcarkey] == 9999)
                                    {
                                        tmp = strtok(cmdtext, idx);
                                        if(!strlen(tmp))
                                        {
                                            SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
                                            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 if(PlayerInfo[giveplayerid][pPcarkey2] == 9999)
                                {
                                    tmp = strtok(cmdtext, idx);
                                    if(!strlen(tmp))
                                    {
                                        SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
                                        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 if(PlayerInfo[giveplayerid][pPcarkey3] == 9999)
                                {
                                    tmp = strtok(cmdtext, idx);
                                    if(!strlen(tmp))
                                    {
                                        SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
                                        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 if(PlayerInfo[giveplayerid][pPcarkey4] == 9999)
                                {
                                    tmp = strtok(cmdtext, idx);
                                    if(!strlen(tmp))
                                    {
                                        SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
                                        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 if(PlayerInfo[giveplayerid][pPcarkey5] == 9999)
                                {
                                    tmp = strtok(cmdtext, idx);
                                    if(!strlen(tmp))
                                    {
                                        SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [price]");
                                        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;
                                }
                            }
                        }
here is the /accept ownablecar


Re: Need help!! [+REP] - Don_Cage - 30.08.2012

Hello, im the new oowner for this server and we still need an anwser on this question. thanks


Re: Need help!! [+REP] - Unte99 - 30.08.2012

Quote:
Originally Posted by Don_Cage
Посмотреть сообщение
Hello, im the new oowner for this server and we still need an anwser on this question. thanks
Oh yeah ? Proove it.


Re: Need help!! [+REP] - Don_Cage - 30.08.2012

if Shayaziz come on and say yes thats enough proof?


Respuesta: Need help!! [+REP] - Siralos - 30.08.2012

Paste your /accept code


Re: Need help!! [+REP] - Don_Cage - 30.08.2012

this is the /accept ownablecar


Re: Need help!! [+REP] - Don_Cage - 30.08.2012

so anyone can help?