Can anyone help me with my script - 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: Can anyone help me with my script (
/showthread.php?tid=163449)
Can anyone help me with my script -
Jay. - 27.07.2010
pawn Код:
if (strcmp("/tune", cmdtext, true, 10) == 0)
{ if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED2,"You must be in a vehicle");
{
new veh;
veh = GetPlayerVehicleID(playerid);
if(IsValidNosVehicle(veh)) return SendClientMessage(playerid,COLOR_RED2,"You can't tune this vehicle");
AddVehicleComponent(veh,1000);
PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
ChangeVehicleColor(veh,0,0);
AddVehicleComponent(veh,1078);
AddVehicleComponent(veh,1087);
SendClientMessage(playerid,COLOR_PINK,"Vehicle tunned!!");
}
return 1;
}
I've got that but its rly bugged..
Hard to explain why but i'll try
When im in a vehicle and i type /tune it'll say you must be in a vehicle and if you type it out of the car itt will say You can't tune this vehicle
help..
Re: Can anyone help me with my script -
Jay. - 27.07.2010
Anyone??
Re: Can anyone help me with my script -
selten98 - 27.07.2010
Quote:
Originally Posted by [BADBOY]
pawn Код:
if (strcmp("/tune", cmdtext, true, 10) == 0) { if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED2,"You must be in a vehicle"); { new veh; veh = GetPlayerVehicleID(playerid); if(IsValidNosVehicle(veh)) return SendClientMessage(playerid,COLOR_RED2,"You can't tune this vehicle"); AddVehicleComponent(veh,1000); PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0); ChangeVehicleColor(veh,0,0); AddVehicleComponent(veh,1078); AddVehicleComponent(veh,1087); SendClientMessage(playerid,COLOR_PINK,"Vehicle tunned!!");
} return 1; }
I've got that but its rly bugged..
Hard to explain why but i'll try
When im in a vehicle and i type /tune it'll say you must be in a vehicle and if you type it out of the car itt will say You can't tune this vehicle
help..
|
i think you mean this
pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED2,"You must be in a vehicle");
if(!IsValidNosVehicle(veh)) return SendClientMessage(playerid,COLOR_RED2,"You can't tune this vehicle");
You simply forgot the !
[solved] -
Jay. - 27.07.2010
Quote:
Originally Posted by selten98
i think you mean this
pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED2,"You must be in a vehicle"); if(!IsValidNosVehicle(veh)) return SendClientMessage(playerid,COLOR_RED2,"You can't tune this vehicle");
You simply forgot the !
|
Thank you!
EDIT: Oh i fixed it myself!