28.11.2013, 16:05
pawn Код:
stock LogVehicleTransfer(seller[], buyer[], sellprice[], senderid)
{
new str[512];
new clean_sellprice[64];
new clean_name[MAX_PLAYER_NAME];
new clean_oname[MAX_PLAYER_NAME];
mysql_real_escape_string(sellprice,clean_sellprice);
mysql_real_escape_string(seller,clean_name);
mysql_real_escape_string(buyer,clean_oname);
format(str,sizeof(str),"INSERT INTO rp_vehicle_transfer_logs (seller,buyer,price) VALUES ('%s','%s','%s')",clean_name,clean_oname,clean_sellprice);
mysql_query(str,player_threads_alt[senderid]);
}
pawn Код:
new other2 = vehicle_sell_sender[playerid];
new sellingprice = vehicle_sell_price[playerid];
new slot = vehicle_sell_offer[playerid];
new str2[256];
new name[MAX_PLAYER_NAME];
new oname[MAX_PLAYER_NAME];
GetCharacterName(playerid,name);
GetCharacterName(other2,oname);
if(response == 1)
{
if(GetDistanceBetweenPlayers(playerid,other2) < 7.5)
{
if(CharacterInfo[playerid][active_character[playerid]][cMoney] >= sellingprice)
{
format(str2,sizeof(str2),"Ai acceptat oferta lui %s pentru vehicul.",oname);
SendClientMessageA(playerid,COLOR_FACTION,str2);
// new vehicleid = GetPlayerVehicleID(playerid);
format(str2,sizeof(str2),"%s a acceptat oferta in legatura cu vehiculul tau!",name);
SendClientMessageA(other2,COLOR_FACTION,str2);
VehicleInfo[slot][vOwner] = CharacterInfo[playerid][active_character[playerid]][cID];
format(VehicleInfo[slot][vOwnerName],MAX_PLAYER_NAME,"%s",name);
CharacterInfo[playerid][active_character[playerid]][cMoney] -= sellingprice;
CharacterInfo[other2][active_character[other2]][cMoney] += sellingprice;
PlayerPlaySound(playerid,1054,0.0,0.0,0.0);
PlayerPlaySound(other2,1054,0.0,0.0,0.0);
format(str2,sizeof(str2),"ia contractul de vanzare-cumparare si il indreapta catre %s pentru a-l semna.",oname);
SendEmote(other2,str2);
format(str2,sizeof(str2),"semneaza contractul..");
SendEmote(playerid,str2);
//LogVehicleTransfer(oname,name,vehicleid,sellprice);
error line LogVehicleTransfer(oname,name,sellingprice,playerid);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Nu ai destui bani pentru a cumpara acest vehicul.");
}
}
because i got this
pawn Код:
C:\Users\Filip\Desktop\SERVER\gamemodes\rp.pwn(12865) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.