public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!IsPlayerNPC(playerid))
{
if(IsPlayerConnected(playerid))
{
if(!ispassenger)
{
if(IsPlayerConnected(playerid))
{
for(new houseid;houseid<MAX_HOUSES;houseid++)
{
for(new x;x<HouseInfo[houseid][CarSlots];x++)
{
if(vehicleid == Vehicle[houseid][x])
{
new HC = GetPVarInt(playerid,"CarID");
new sa[128];
format(sa,100,"VRLS/Houses/House%d.Car%d.txt",houseid,HC);
new blockmsg[128];
format(blockmsg,128,"~r~WARNING~n~~n~~w~This vehicle belongs to the player:~n~~g~%s",DOF2_GetString(sa,"Owner"));
FormatPlayerInfoBox(playerid,"~g~Virtual Reality",blockmsg,3000);
StopPlayer(playerid);
return 0;
}
}
}
}
}
}
}
return 1;
}
if(IsPlayerConnected(playerid)) { if(!ispassenger) { if(IsPlayerConnected(playerid))
One if(IsPlayerConnected(playerid)) is delete and return and I get back return 1... and did not do anything
|
if(!ispassenger)
{
for(new houseid;houseid<MAX_HOUSES;houseid++)
{
for(new x;x<HouseInfo[houseid][CarSlots];x++)
{
if(vehicleid == Vehicle[houseid][x])
{
new HC = GetPVarInt(playerid,"CarID");
new sa[128];
format(sa,100,"VRLS/Houses/House%d.Car%d.txt",houseid,HC);
if(!DOF2_IsSet(sa,"Owner"))
{
new blockmsg[128];
format(blockmsg,128,"~r~WARNING~n~~n~~w~This vehicle belongs to the player:~n~~g~%s",DOF2_GetString(sa,"Owner"));
FormatPlayerInfoBox(playerid,"~g~Virtual Reality",blockmsg,3000);
StopPlayer(playerid);
return 1;
}
}
}
}
}