+1 rep for helping me out.
#1

Hi I get this error then I compile my stuff

Код:
C:\Users\Canip\Desktop\GRP\gamemodes\lsrpedit.pwn(25226) : error 036: empty statement
C:\Users\Canip\Desktop\GRP\gamemodes\lsrpedit.pwn(35780) : warning 203: symbol is never used: "PoliceTrunk2"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And this is the line.

Код:
 }
	else if(PlayerInCar(playerid))
	{
		new vehicle = GetPlayerVehicleID(playerid);//From here
		if(IsACopCar(vehicle));
		if(IsACopCarSD(vehicle))//To here
		{
			if(slotid >= sizeof(PoliceTrunk)) return SCM(playerid, COLOR_GREY, "Invalid slot.");
			new faction = PlayerInfo[playerid][pFaction];
			if(faction != LSPD && SASD) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");
			if(!CopDuty{playerid}) return SCM(playerid, COLOR_LIGHTRED, "You must be on duty.");
			format(msg, sizeof(msg), "grabs a %s from the Cruiser's trunk.", GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
			ActionMessage(playerid, 15.0, msg);
			GiveWeapon(playerid, PoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
		}
Reply
#2

" if(IsACopCar(vehicle));"
Remove this.
Reply
#3

I need that one.

It has to define both of them.
Reply
#4

Do you mean it like this?
PHP код:
else if(PlayerInCar(playerid))
{
    new 
vehicle GetPlayerVehicleID(playerid);
    if(
IsACopCar(vehicle) && IsACopCarSD(vehicleid))
    {
        if(
slotid >= sizeof(PoliceTrunk)) return SCM(playeridCOLOR_GREY"Invalid slot.");
        new 
faction PlayerInfo[playerid][pFaction];
        if(
faction != LSPD && SASD) return SCM(playeridCOLOR_LIGHTRED"Invalid faction.");
        if(!
CopDuty{playerid}) return SCM(playeridCOLOR_LIGHTRED"You must be on duty.");
        
format(msgsizeof(msg), "grabs a %s from the Cruiser's trunk."GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
        
ActionMessage(playerid15.0msg);
        
GiveWeapon(playeridPoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
    }

Reply
#5

Код:
        else if(PlayerInCar(playerid))
	{
		new vehicle;
                vehicle = GetPlayerVehicleID(playerid);
		if(IsACopCar(vehicle))
		if(IsACopCarSD(vehicle)
		{
			if(slotid >= sizeof(PoliceTrunk)) return SCM(playerid, COLOR_GREY, "Invalid slot.");
			new faction = PlayerInfo[playerid][pFaction];
			if(faction != LSPD && SASD) return SCM(playerid, COLOR_LIGHTRED, "Invalid faction.");
			if(!CopDuty{playerid}) return SCM(playerid, COLOR_LIGHTRED, "You must be on duty.");
			format(msg, sizeof(msg), "grabs a %s from the Cruiser's trunk.", GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
			ActionMessage(playerid, 15.0, msg);
			GiveWeapon(playerid, PoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
		}
Reply
#6

Worked?
Reply
#7

Quote:
Originally Posted by MarvinPWN
Посмотреть сообщение
Do you mean it like this?
PHP код:
else if(PlayerInCar(playerid))
{
    new 
vehicle GetPlayerVehicleID(playerid);
    if(
IsACopCar(vehicle) && IsACopCarSD(vehicleid))
    {
        if(
slotid >= sizeof(PoliceTrunk)) return SCM(playeridCOLOR_GREY"Invalid slot.");
        new 
faction PlayerInfo[playerid][pFaction];
        if(
faction != LSPD && SASD) return SCM(playeridCOLOR_LIGHTRED"Invalid faction.");
        if(!
CopDuty{playerid}) return SCM(playeridCOLOR_LIGHTRED"You must be on duty.");
        
format(msgsizeof(msg), "grabs a %s from the Cruiser's trunk."GetWeaponNameEx(PoliceTrunk[slotid][wepID]));
        
ActionMessage(playerid15.0msg);
        
GiveWeapon(playeridPoliceTrunk[slotid][wepID], PoliceTrunk[slotid][wepAmmo]);
    }

Yes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)