Jump to content
  • 0

Problema comanda /v sellto gamemode Blown


Serafim

Question

Problemă întâlnită (descriere):  Daca dau /v sellto imi apare mesajul asta http://i.imgur.com/90DdIi0.png : ok, dar... multi jucatori pot lua teapa, si asa ca... as vrea o comanda functionala de /v sellto care sa mearga, fara buguri. Stiu ca cer totul pe farfurie, imi pare rau... dar am incercat sa fac comanda singur, sa iau din alt gamemode, si nu am gasit, nu am facut bine. Asa ca v-as ruga... sa-mi dati voi una, sau sa o reparati pe a mea. 
Ero(area / rile) / warning-(ul / urile): http://i.imgur.com/90DdIi0.png
Liniile de cod / sursa / script-ul:   [pawn] SendUsage(playerid,"/v sellto [playerid/PartOfName] [pret]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, giveplayerid))
{
if(PlayerData[giveplayerid][pPcarkey] == 999)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [pret]");
return 1;
}
new price;
price = strval(tmp);
if(price < 1 || price > 1500000)
{
SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie de la 1$ pana la 1500000$. ");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* I-ai oferit lui %s masina ta pentru $%d .", giveplayer, price);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Propietarul masinii %s ti-a oferit masina pentru $%d (scrie /accept ownablecar) s-o cumperi.", playername, price);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
OwnableCarID[giveplayerid] = ownvehkey;
OwnableCarOffer[giveplayerid] = playerid;
OwnableCarPrice[giveplayerid] = price;
return 1;
}
else if(PlayerData[giveplayerid][pPcarkey2] == 999)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [pret]");
return 1;
}
new price;
price = strval(tmp);
if(price < 1 || price > 1500000)
{
SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie de la 1$ pana la 1500000$. ");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* I-ai oferit lui %s masina ta pentru $%d .", giveplayer, price);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Propietarul masinii %s ti-a oferit masina pentru $%d (scrie /accept ownablecar) s-o cumperi.", playername, price);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
OwnableCarOffer[giveplayerid] = playerid;
OwnableCarID[giveplayerid] = ownvehkey;
OwnableCarPrice[giveplayerid] = price;
return 1;
}
else if(PlayerData[giveplayerid][pPcarkey3] == 999)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [pret]");
return 1;
}
new price;
price = strval(tmp);
if(price < 1 || price > 1500000)
{
SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie de la 1$ pana la 1500000$. ");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* I-ai oferit lui %s masina ta pentru $%d .", giveplayer, price);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Propietarul masinii %s ti-a oferit masina pentru $%d (scrie /accept ownablecar) s-o cumperi.", playername, price);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
OwnableCarOffer[giveplayerid] = playerid;
OwnableCarID[giveplayerid] = ownvehkey;
OwnableCarPrice[giveplayerid] = price;
return 1;
}
if(PlayerData[giveplayerid][pPcarkey4] == 999)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [pret]");
return 1;
}
new price;
price = strval(tmp);
if(price < 1 || price > 1500000)
{
SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie de la 1$ pana la 1500000$. ");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* I-ai oferit lui %s masina ta pentru $%d .", giveplayer, price);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Propietarul masinii %s ti-a oferit masina pentru $%d (scrie /accept ownablecar) s-o cumperi.", playername, price);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
OwnableCarOffer[giveplayerid] = playerid;
OwnableCarID[giveplayerid] = ownvehkey;
OwnableCarPrice[giveplayerid] = price;
return 1;
}
if(PlayerData[giveplayerid][pPcarkey5] == 999)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: /v sellto [playerid/PartOfName] [pret]");
return 1;
}
new price;
price = strval(tmp);
if(price < 1 || price > 1500000)
{
SendClientMessage(playerid, COLOR_GREY, " Pretul trebuie sa fie de la 1$ pana la 1500000$. ");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* I-ai oferit lui %s masina ta pentru $%d .", giveplayer, price);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Propietarul masinii %s ti-a oferit masina pentru $%d (scrie /accept ownablecar) s-o cumperi.", playername, price);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
OwnableCarOffer[giveplayerid] = playerid;
OwnableCarID[giveplayerid] = ownvehkey;
OwnableCarPrice[giveplayerid] = price;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Playerul are deja 5 masini !");
return 1;
}

}
else
{
SendClientMessage(playerid, COLOR_GREY, "Acest jucator nu este langa tine!");
return 1;
}
}
}

}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nu este masina ta ");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Trebuie sa fi in masina ca sa o vinzi!");
return 1;
}
}
return 1;
}[/pawn]
Imagini / Video (optional): http://i.imgur.com/90DdIi0.png
Aţi încercat să rezolvaţi singur?: Da..

 

P.S: E Gamemode, nu am lucrat la nume, una alta. doar la comenzi mai mult, si la test.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.