[pawn]/*==============================[ Jármû eladása ]============================*/
CMD:a_elad(playerid,params[])
{
new Jatekos[MAX_PLAYER_NAME];
new SavesString[128];
GetPlayerName(playerid, Jatekos, sizeof(Jatekos));
/*------------------*/
new osszeg,eladoo[50];
new Text3D:asd1,Text3D:asd2;
new Float:X, Float:Y, Float:Z;
/*---------*/
if(sscanf(params,\"i\",osszeg))return SendClientMessage(playerid,-1,\"HIBA: /a_elad [Összeg]\");
{
if(IsPlayerAdmin(playerid))
{
if(IsPlayerInAnyVehicle(playerid) && Elado[GetPlayerVehicleID(playerid)] == 0)
{
format(SavesString, sizeof(SavesString), \"/TDM/Jármûvek/%d\",GetPlayerVehicleID(playerid));
/**/new string[256],string2[60],string3[60];
format(string,sizeof(string),\"A jármûvet eladtad, ezentúl megvehetõ %d$-ért.\",osszeg);/**/
SendClientMessage(playerid, -1, string);
Elado[GetPlayerVehicleID(playerid)] = 1;
dini_IntSet(SavesString, \"Autó értéke\", osszeg);
GetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z);
/*------------------------------*/
if(Elado[GetPlayerVehicleID(playerid)] == 1) { eladoo = \"Igen\"; }
else if(Elado[GetPlayerVehicleID(playerid)] == 0) { eladoo = \"Nem\";}
/*------------------------------*/
format(string2,sizeof(string2),\"Eladó: %s\",eladoo);
format(string3,sizeof(string3),\"Ár: %d\",osszeg);
asd1 = Create3DTextLabel(string2, -1, X, Y, Z+5, 10.0,0,0);
asd2 = Create3DTextLabel(string3, -1, X, Y, Z+4, 10.0,0,0);
Attach3DTextLabelToVehicle(asd1, GetPlayerVehicleID(playerid),0,0,3);
Attach3DTextLabelToVehicle(asd2, GetPlayerVehicleID(playerid),0,0,4);
}
}
}
return 1;
}[/pawn]