09.09.2011, 16:02
Thank you but, now it seems that it returns every car as default...
I tried with all the vehicle ID's but when I attempt to shoot it keeps saying, this car is not stealable
pawn Код:
new panels,doors,lights,tires;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
//==============================================================================
//Car stealing system
//==============================================================================
if(IsPlayerLookingAtVehicle(playerid,vehicleid))
{
if(gTeam[playerid] == TEAM_BANDIT)
{
if(unlocked[vehicleid] == 1)
{
GameTextForPlayer(playerid,"~y~This vehicle is already unlocked!",4000,3);
return 1;
}
if(unlocked[vehicleid] == 0)
{
switch(vehicleid)
{
//////////
//Nebula//
//////////
case 516:
{
if(doors <100)
{
new crand = random(100);
if(crand <= 10)
{
GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this door, try another car...",4000,3);
funlocked[vehicleid] = 1;
SetTimer("lockshotrectim", 30000, false);
unlocked[vehicleid] = 0;
}
else if(crand > 10)
{
unlocked[vehicleid] = 1;
GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
}
}
}
//////////////
//Washington//
//////////////
case 421:
{
if(doors <100)
{
new crand = random(100);
if(crand <= 30)
{
GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this door, try another car...",4000,3);
funlocked[vehicleid] = 1;
SetTimer("lockshotrectim", 30000, false);
unlocked[vehicleid] = 0;
}
else if(crand > 30)
{
unlocked[vehicleid] = 1;
GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
}
}
}
///////////
//Stretch//
///////////
case 409:
{
if(doors <100)
{
new crand = random(100);
if(crand <= 60)
{
GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this door, try another car...",4000,3);
funlocked[vehicleid] = 1;
SetTimer("lockshotrectim", 30000, false);
unlocked[vehicleid] = 0;
}
else if(crand > 60)
{
unlocked[vehicleid] = 1;
GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
}
}
}
//======================================================
//Cops
//======================================================
////////
//Lspd//
////////
case 596:
{
if(doors <100)
{
new crand = random(100);
if(crand <= 75)
{
GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this good secured door, try another car...",4000,3);
funlocked[vehicleid] = 1;
SetTimer("lockshotrectim", 30000, false);
unlocked[vehicleid] = 0;
}
else if(crand > 75)
{
unlocked[vehicleid] = 1;
GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
}
}
}
////////
//Lspd//
////////
case 599:
{
if(doors <100)
{
new crand = random(100);
if(crand <= 75)
{
GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this good secured door, try another car...",4000,3);
funlocked[vehicleid] = 1;
SetTimer("lockshotrectim", 30000, false);
unlocked[vehicleid] = 0;
}
else if(crand > 75)
{
unlocked[vehicleid] = 1;
GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
}
}
}
///////////
//S.W.A.T//
///////////
case 601:
{
if(doors <100)
{
new crand = random(100);
if(crand <= 90)
{
GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this heavy secured door, try another car...",4000,3);
funlocked[vehicleid] = 1;
SetTimer("lockshotrectim", 30000, false);
unlocked[vehicleid] = 0;
}
else if(crand > 90)
{
unlocked[vehicleid] = 1;
GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
}
}
}
///////
//FBI//
///////
case 490:
{
if(doors <100)
{
new crand = random(100);
if(crand <= 95)
{
GameTextForPlayer(playerid,"~r~U have failed shooting the lock of this heavy secured door, try another car...",4000,3);
funlocked[vehicleid] = 1;
SetTimer("lockshotrectim", 30000, false);
unlocked[vehicleid] = 0;
}
else if(crand > 95)
{
unlocked[vehicleid] = 1;
GameTextForPlayer(playerid,"~y~U have unlocked this Vehicle by shooting its door!",4000,3);
}
}
}
default:
{
SendClientMessage(playerid, COLOR_RED, "This car is not stealable!");
}
}
}
}
}