some commands help pls - 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: some commands help pls (
/showthread.php?tid=270752)
some commands help pls -
CoNvErTeR - 21.07.2011
Command 1, i got no errors but its not working ingame..
Код:
CMD:vr(playerid,params[])
{
new str[130];
SetVehicleHealth(playerid,1000);
format(str,130, "You have fixed your vechicle");
SendClientMessage(playerid,yellow,str);
return 1;
}
Command 2 also no errors but not working ingame
Код:
CMD:carcolor(playerid,params[])
{
new str[130],color1,color2;
IsPlayerInAnyVehicle(playerid);
if(sscanf(params, "dd", color1,color2)) return SendClientMessage(playerid,red,"/carcolor [color1] [color2]");
ChangeVehicleColor(playerid,color1,color2);
format(str,130, "You have changed your vehicle color");
SendClientMessage(playerid,yellow,str);
return 1;
}
i am using zcmd
Thanks
Re: some commands help pls -
grand.Theft.Otto - 21.07.2011
Do you have
At the top of your script ?
Re: some commands help pls -
Shockey HD - 21.07.2011
Are You Getting a response saying Unkown Command?
Re: some commands help pls -
CoNvErTeR - 21.07.2011
Quote:
Originally Posted by grand.Theft.Otto
Do you have
At the top of your script ?
|
Yes i do
Re: some commands help pls -
grand.Theft.Otto - 21.07.2011
Quote:
Originally Posted by Shockey HD
Are You Getting a response saying Unkown Command?
|
Yes he is, I was helping him on TeamViewer.
Re: some commands help pls -
CoNvErTeR - 21.07.2011
Quote:
Originally Posted by Shockey HD
Are You Getting a response saying Unkown Command?
|
At each, i get "Your vechicle has been repaired" and its not
Other one "Your colour has been changed to __ __" and its not...
Re: some commands help pls -
Mean - 21.07.2011
pawn Код:
CMD:vr( playerid, params [ ] ) {
if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, red, "You need to be in a vehicle to use this. " );
RepairVehicle( GetPlayerVehicleID( playerid ) );
return SendClientMessage( playerid, yellow, "You have fixed your vechicle" );
}
pawn Код:
CMD:carcolor( playerid, params[ ] ) {
new color1, color2;
if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, red, "You need to be in a vehicle to use this. " );
if( sscanf( params, "dd", color1, color2 ) ) return SendClientMessage( playerid, red, "/carcolor [color1] [color2]" );
ChangeVehicleColor( GetPlayerVehicleID( playerid ), color1, color2 );
return SendClientMessage( playerid, yellow, "You have changed your vehicle color" );
}
There were a FEW obvious errors in the code...
Re: some commands help pls -
CoNvErTeR - 21.07.2011
Quote:
Originally Posted by Mean
pawn Код:
CMD:vr( playerid, params [ ] ) { if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, red, "You need to be in a vehicle to use this. " ); RepairVehicle( GetPlayerVehicleID( playerid ) ); return SendClientMessage( playerid, yellow, "You have fixed your vechicle" ); }
pawn Код:
CMD:carcolor( playerid, params[ ] ) { new color1, color2; if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, red, "You need to be in a vehicle to use this. " ); if( sscanf( params, "dd", color1, color2 ) ) return SendClientMessage( playerid, red, "/carcolor [color1] [color2]" ); ChangeVehicleColor( GetPlayerVehicleID( playerid ), color1, color2 ); return SendClientMessage( playerid, yellow, "You have changed your vehicle color" ); }
There were a FEW obvious errors in the code...
|
Thanks its working
Re: some commands help pls -
Mean - 21.07.2011
No problem.