SA-MP Forums Archive
know someone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: know someone (/showthread.php?tid=164689)



know someone - admine - 01.08.2010

How to make a car buyable!


Re: know someone - willsuckformoney - 01.08.2010

i was thinking about doing that lol buuut im having a little trouble, if no one gets you anything by time im done i lend you


Re: know someone - Ash. - 01.08.2010

pawn Код:
veh = CreateVehicle(blah blah)
SetVehicleParams(veh, 1);

public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp("/yourcommand", cmdtext) == 0)
{
GivePlayerMoney(playerid, -yourprice (with minus);
DestroyVehicle(veh);
new Float:x, Float:y, Float:z
GetPlayerPos(playerid, x, y, z);
CreateVehicle(blah, x+5, y+5, z);
}
Something like that, thats really really basic though lol

Something basic like that


Re: know someone - admine - 01.08.2010

Quote:
Originally Posted by funky1234
Посмотреть сообщение
pawn Код:
veh = CreateVehicle(blah blah)
SetVehicleParams(veh, 1);

public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp("/yourcommand", cmdtext) == 0)
{
GivePlayerMoney(playerid, -yourprice (with minus);
DestroyVehicle(veh);
new Float:x, Float:y, Float:z
GetPlayerPos(playerid, x, y, z);
CreateVehicle(blah, x+5, y+5, z);
}
Something like that, thats really really basic though lol

Something basic like that
thanks
but where should I put in my script?


Re: know someone - willsuckformoney - 01.08.2010

[pawn]
// at top
veh = CreateVehicle(blah blah)
SetVehicleParams(veh, 1);

//OnPlayerCommandText duh
public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp("/yourcommand", cmdtext) == 0)
{
GivePlayerMoney(playerid, -yourprice (with minus);
DestroyVehicle(veh);
new Float, Float:y, Float:z
GetPlayerPos(playerid, x, y, z);
CreateVehicle(blah, x+5, y+5, z);
}


Re: know someone - admine - 01.08.2010

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
[pawn]
// at top
veh = CreateVehicle(blah blah)
SetVehicleParams(veh, 1);

//OnPlayerCommandText duh
public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp("/yourcommand", cmdtext) == 0)
{
GivePlayerMoney(playerid, -yourprice (with minus);
DestroyVehicle(veh);
new Float, Float:y, Float:z
GetPlayerPos(playerid, x, y, z);
CreateVehicle(blah, x+5, y+5, z);
}
thanks verry match