Detaljan opis problema:Mozel neko da mi prebaci ovu komandu iz ZCMD u SSCANF molim vas hitno mi je
MODERATORI NEMOJTE LOCK DOK MI NEKO NE POMOGNE MOLIM VAS
Dio skripte:
CMD:sellcarto(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged == 0)
{
SCM(playerid, COLOR_GREY, " Morate prvo da se ulogujete! ");
return 1;
}
new string,sendername;
GetPlayerName(playerid, sendername,sizeof(sendername));
new giveplayerid, giveplayer,price;
if(sscanf(params,"ud",giveplayerid,price)) return SCM(playerid, COLOR_WHITE, "SAVET: /sellcarto [playerID/DeoImena] ");
if(GetPlayerVehicleID(playerid) == PlayerInfo || GetPlayerVehicleID(playerid) == PlayerInfo)
{
new ownvehkey;
if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo) { ownvehkey = PlayerInfo; }
else { return 1; }
if(strcmp(sendername, CarInfo, true) == 0)
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, giveplayerid))
{
if(PlayerInfo == 9999)
{
if(price < 1 || price > 1500000)
{
SCM(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);
SCM(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (kucajte /accept ownablecar) to buy.", sendername, price);
SCM(giveplayerid, COLOR_WHITE, string);
OwnableCarOffer = playerid;
OwnableCarID = ownvehkey;
OwnableCarPrice = price;
return 1;
}
else if(PlayerInfo == 9999)
{
if(price < 1 || price > 1500000)
{
SCM(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);
SCM(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "* Car Owner %s offered you to buy his/her car for $%d (kucajte /accept ownablecar) to buy.", sendername, price);
SCM(giveplayerid, COLOR_WHITE, string);
OwnableCarOffer = playerid;
OwnableCarID = ownvehkey;
OwnableCarPrice = price;
return 1;
}
else
{
SCM(playerid, COLOR_GREY, "Igrac vec ima dva vozila");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " Player is not near you ! ");
return 1;
}
}
}
else
{
SCM(playerid, COLOR_GREY, " Vi niste vlasnik ovog vozila");
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " You have to sit at your own car to sell it");
return 1;
}
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno)://///
