SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 19/12/2009, 09:12 AM   #1
Rickzor14
Big Clucker
 
Join Date: Sep 2009
Posts: 74
Reputation: -1
Default /sellveh Can sell for Unlimited cash?

Hi,

I have this script:
if (strcmp(cmd, "/sellveh", true) ==0 )
{
if(!IsPlayerInAnyVehicle(playerid)){return 1;}
if(GetCreatorID(vehicleid)!=0)
{
if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)){SendClientMessage(playerid,WHITE, "INFO: /sellveh [Price]");return 1;}
new Float:vx,Float:vy,Float:vz,Float:va;
GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,v z);
GetVehicleZAngle(GetPlayerVehicleID(playerid),va);
VehicleSystem[GetCreatorID(vehicleid)][x]=vx;
VehicleSystem[GetCreatorID(vehicleid)][y]=vy;
VehicleSystem[GetCreatorID(vehicleid)][z]=vz;
VehicleSystem[GetCreatorID(vehicleid)][a]=va;
VehicleSystem[GetCreatorID(vehicleid)][preis]=strval(tmp);
strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar",0,128,12;
SendClientMessage(playerid,WHITE,"This vehicle is now for Sale!");
GivePlayerMoney(playerid,strval(tmp));
SaveTool();
}
else
{
SendClientMessage(playerid,WHITE,"This Vehicle isnt yours!");
}
}
return 1;
}

But people can sell it for As much as they want,

Could anyone help me making it that you cant sell over the Half of the price you bought it for..
__________________
Rickzor14 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
car sell Headshot1108 Help Archive 2 17/02/2010 08:41 PM
/sell weapon TouR Help Archive 12 02/02/2010 04:53 PM
Sell Property Bug ... Help steven_italy Help Archive 2 15/06/2009 05:40 PM
How to set limited for sellveh speedy199 Help Archive 6 27/03/2009 01:50 AM


All times are GMT. The time now is 02:23 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.