16.09.2009, 15:38
Hello, I'll need some help as I'm really new on doing script for SAMP. I would like to do that nobody can add NOS into bikes as that cause crashes.
This is how my script looks right now.
Thanks!
This is how my script looks right now.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new vehicleid = GetPlayerVehicleID(playerid);
if (newkeys == KEY_SUBMISSION){
if (GetPlayerMoney(playerid)>1049){
AddVehicleComponent(vehicleid, 1010); // Nitro
GivePlayerMoney(playerid,-1050);
SendClientMessage(playerid,COLOR_GREEN,"Nitro added to vehicle ((Cost:1050$))");}
else{
SendClientMessage(playerid,COLOR_RED,"You don't have money for nitro, earn some first! (cost 1050$)");
}}
return 1;
}