some commands help pls
#1

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
Reply
#2

Do you have

pawn Код:
#include <zcmd>
At the top of your script ?
Reply
#3

Are You Getting a response saying Unkown Command?
Reply
#4

Quote:
Originally Posted by grand.Theft.Otto
Посмотреть сообщение
Do you have

pawn Код:
#include <zcmd>
At the top of your script ?
Yes i do
Reply
#5

Quote:
Originally Posted by Shockey HD
Посмотреть сообщение
Are You Getting a response saying Unkown Command?
Yes he is, I was helping him on TeamViewer.
Reply
#6

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...
Reply
#7

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...
Reply
#8

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
Reply
#9

No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)