16.06.2010, 11:42
Ok so when i go up to the vehicle it says you're not near any vehicle and anything i try just leads to it saying somthing esle, Any idea what could be wrong here?
pawn Код:
if (strcmp(cmd, "/robveh", true) == 0)
{
if(pToolkit[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You haven't got a toolkit !");
return 1;
}
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You are in a vehicle !");
return 1;
}
if(!ProxDetectorV(4, playerid, VehicleInfo[playerid][vOwned]))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You are not near any a vehicle !");
return 1;
}
if(VehicleInfo[vehicleid][vLock] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "This vehicle is not locked !");
return 1;
}
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name, VehicleInfo[vehicleid][vOwner], true) == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You can't rob your vehicle !");
return 1;
}
if(pToolkit[playerid] < VehicleInfo[vehicleid][vLock])
{
format(string, sizeof(string), "%s has failed to rob a vehicle", name);
ProxDetector(15, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
return 1;
}
else if(pToolkit[playerid] == VehicleInfo[vehicleid][vLock])
{
format(string, sizeof(string), "%s has attemps to rob a vehicle", name);
ProxDetector(15, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SetTimerEx("RobVeh", 5000, false, "d", playerid, vehicleid);
Egale[playerid] = 1;
return 1;
}
else if(pToolkit[playerid] > VehicleInfo[vehicleid][vLock])
{
format(string, sizeof(string), "%s has attemps to rob a vehicle", name);
ProxDetector(15, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SetTimerEx("RobVeh", 5000, false, "d", playerid, vehicleid);
Egale[playerid] = 0;
return 1;
}
}
}