Help with SSCANF and DCMD
#2

Wich line is 225?

Edit: sorry, didn't read "line 225 is bla bla"

Код:
dcmd_engine(playerid,params[])
{
 new State[50];
 if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,RED,"You must be in a vehicle!");
 if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid,RED,"You must be the Driver of the vehicle!");
 if(sscanf(params[0],"s",State))
 {
  SendClientMessage(playerid,RED,"Usage: '/engine (on-off)'");
 	return 1;
 }
 if(State,"ON",true)) // (State == "On") or (State == "oN") or (State == "on")
 {
 	SendClientMessage(playerid,GREEN,"Turning the Engine ON, Please Stand By");
	SendClientMessage(playerid,ORANGE,"*");
	SendClientMessage(playerid,ORANGE,"*");
	SendClientMessage(playerid,ORANGE,"*");
	SendClientMessage(playerid,ORANGE,"*");
	SendClientMessage(playerid,ORANGE,"*");
	SendClientMessage(playerid,ORANGE,"*");
	SendClientMessage(playerid,GREEN,"The vehicle is ON!");
 }
 return 1;
}
try that, (not tested)
Reply


Messages In This Thread
Help with SSCANF and DCMD - by almighty - 15.09.2009, 15:33
Re: Help with SSCANF and DCMD - by _Vortex - 15.09.2009, 15:36
Re: Help with SSCANF and DCMD - by Clavius - 15.09.2009, 15:37
Re: Help with SSCANF and DCMD - by Calgon - 15.09.2009, 15:42

Forum Jump:


Users browsing this thread: 3 Guest(s)