else if(!strcmp(param, "hire"))
{
new Float:x, Float:y, Float:z, Float:prot;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, prot);
for(new i; i < MAX_DLABS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 300.0, DrugLabs[i][ExitX], DrugLabs[i][ExitY], DrugLabs[i][ExitZ]))
{
if(DrugLabs[i][OwnerID] == PlayerInfo[playerid][ID])
{
new DB_Query[150];
LabCooker[i] = CreateActor(70, x, y, z, prot);
ApplyActorAnimation(LabCooker[i], "BD_FIRE", "wash_up", 4.1, 1, 0, 0, 0, 0);
SetActorVirtualWorld(LabCooker[i], DrugLabs[i][VirtualWorld]);
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `DrugLabs` SET `ActorSkin` = 70, `ActorPosX` = %f, `ActorPosY` = %f, `ActorPosZ` = %f, `ActorRot` = %f WHERE `ID` = %d"
, x, y, z, prot, DrugLabs[i][ID]);
mysql_tquery(Database, DB_Query);
SendClientMessage(playerid, COLOR_WHITE, "Hired!");
break;
}
else
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
SCM(playerid, COLOR_GREY, "You don't own this place.");
break;
}
else
{
SCM(playerid, COLOR_GREY, "Nu ai cheie.");
break;
}
}
}
else
{
if(PlayerInfo[playerid][pLanguage] == 1)
{
SCM(playerid, COLOR_GREY, "You are not inside a druglab.");
break;
}
else
{
SCM(playerid, COLOR_GREY, "Nu esti intr-un druglab.");
break;
}
}
}
}
if(DrugLabs[i][OwnerID] == PlayerInfo[playerid][ID])
{
new DB_Query[150];
LabCooker[i] = CreateActor(70, x, y, z, prot);
ApplyActorAnimation(LabCooker[i], "BD_FIRE", "wash_up", 4.1, 1, 0, 0, 0, 0);
SetActorVirtualWorld(LabCooker[i], DrugLabs[i][VirtualWorld]);
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `DrugLabs` SET `ActorSkin` = 70, `ActorPosX` = %f, `ActorPosY` = %f, `ActorPosZ` = %f, `ActorRot` = %f WHERE `ID` = %d"
, x, y, z, prot, DrugLabs[i][ID]);
mysql_tquery(Database, DB_Query);
SendClientMessage(playerid, COLOR_WHITE, "Hired!");
break;
}
if(DrugLabs[i][OwnerID] == PlayerInfo[playerid][ID])
{
new DB_Query[150];
LabCooker[i] = CreateActor(70, x, y, z, prot);
ApplyActorAnimation(LabCooker[i], "BD_FIRE", "wash_up", 4.1, 1, 0, 0, 0, 0);
SetActorVirtualWorld(LabCooker[i], DrugLabs[i][VirtualWorld]);
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `DrugLabs` SET `ActorSkin` = 70, `ActorPosX` = %f, `ActorPosY` = %f, `ActorPosZ` = %f, `ActorRot` = %f WHERE `ID` = %d"
, x, y, z, prot, DrugLabs[i][ID]);
mysql_tquery(Database, DB_Query);
SendClientMessage(playerid, COLOR_WHITE, "Hired!");
}
|
I removed the break from here:
PHP код:
|
|
I didn't meant to remove break from there but from other parts...
|
else if(!strcmp(param, "hire"))
{
new i;
for( i=0; i < MAX_DLABS; i++)
if(IsPlayerInRangeOfPoint(playerid, 300.0, DrugLabs[i][ExitX], DrugLabs[i][ExitY], DrugLabs[i][ExitZ]))
break;
if(i == MAX_DLABS)
SCM(playerid, COLOR_GREY,(PlayerInfo[playerid][pLanguage] == 1)?( "You are not inside a druglab."):("Nu esti intr-un druglab."));
else if(DrugLabs[i][OwnerID] == PlayerInfo[playerid][ID])
{
new DB_Query[150];
LabCooker[i] = CreateActor(70, x, y, z, prot);
ApplyActorAnimation(LabCooker[i], "BD_FIRE", "wash_up", 4.1, 1, 0, 0, 0, 0);
SetActorVirtualWorld(LabCooker[i], DrugLabs[i][VirtualWorld]);
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `DrugLabs` SET `ActorSkin` = 70, `ActorPosX` = %f, `ActorPosY` = %f, `ActorPosZ` = %f, `ActorRot` = %f WHERE `ID` = %d"
, x, y, z, prot, DrugLabs[i][ID]);
mysql_tquery(Database, DB_Query);
SendClientMessage(playerid, COLOR_WHITE, "Hired!");
}
else
SCM(playerid, COLOR_GREY, (PlayerInfo[playerid][pLanguage] == 1)?("You don't own this place."):("Nu ai cheie."));
}
|
C:\Users\andrei\Desktop\Scripting SA-MP\Basic RP Script Scratch FIX\gamemodes\U1.pwn(3725) : warning 215: expression has no effect
for( i; i < MAX_DLABS; i++) |