cmds problem help rep+
#1

Here the warning i get
Код:
C:\Users\rцva\Desktop\basesricpt\gamemodes\Testsricpt.pwn(33516) : warning 217: loose indentation
Here is the cmd
Код:
}
CMD:engine(playerid, paramas[])
{
   if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
   {
		new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
		vehicleid = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
		GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
		if(engine == VEHICLE_PARAMS_ON)
		{
            new sendername[MAX_PLAYER_NAME];
            new string[128];
			SetVehicleEngine(vehicleid, playerid);
			format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine.", sendername);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		}
	}
	return 1;
}
Reply
#2

You need to indent your code
http://pastebin.com/U2W4HNTU
Reply
#3

Try this:

pawn Код:
CMD:engine(playerid, paramas[])
{
   if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
   {
        new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine == VEHICLE_PARAMS_ON)
        {
            new sendername[MAX_PLAYER_NAME];
            new string[128];
            SetVehicleEngine(vehicleid, playerid);
            format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine.", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
    }
    return 1;
}
Edit: Too late
Reply
#4

you need to make it straight.
Ex:
Bad:(will give you this warning)
pawn Код:
OnPlayerConntect()
{
      SendClientMessage(playerid,COLOR_YELLOW,"Text1");
          SendClientMessage(playerid,COLOR_YELLOW,"Text2");
      return 1;
}
Good:(will not give you this warning)
pawn Код:
OnPlayerConntect()
{
      SendClientMessage(playerid,COLOR_YELLOW,"Text1");
      SendClientMessage(playerid,COLOR_YELLOW,"Text2");
      return 1;
}
Reply
#5

Thanks guys both get rep for this
Reply
#6

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
Thanks guys both get rep for this
both? lol
Reply
#7

(sorry for double posting)
what with me? >.< lol
Reply
#8

Quote:
Originally Posted by xkirill
Посмотреть сообщение
(sorry for double posting)
what with me? >.< lol
you dont help me with the command xD lol
Reply
#9

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
you dont help me with the command xD lol
scroll up and you will i did
Reply
#10

well so you use this when you get warning SendClientMessage(playerid,COLOR_YELLOW,"Text1");
SendClientMessage(playerid,COLOR_YELLOW,"Text2");? that sounds wrong lol xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)