13.04.2011, 10:55
Everytime I try to compile this GameMode, my compiler crashes and I can't find the problem :S
PasteBin: http://pastebin.com/CNY39cDF
PasteBin: http://pastebin.com/CNY39cDF
DisableInteriorEnterExits(); //Disables yellow marker
EnableStuntBonusForAll(0);//No Stunts!
//=======================================CLASS=======================================//
AddPlayerClass(250, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Citizen
AddPlayerClass(56, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Citizen
AddPlayerClass(280, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Police
AddPlayerClass(281, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Police
AddPlayerClass(7, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Criminal
AddPlayerClass(29, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Criminal
AddPlayerClass(294, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Admin
AddPlayerClass(211, 1446.4160, -2286.8571, 13.5468, 269.1425, 0, 0, 0, 0, 0, 0); //Admin
//========================================CARS========================================//
Cars[Police] = CreateVehicle(596, 1536.000244, -1667.221557, 13.102879, 0.564065, -1, -1,900);
Cars[Police] = CreateVehicle(596, 1536.100463, -1677.430908, 13.104556, 0.564411, -1, -1,900);
Cars[Police] = CreateVehicle(596, 1585.333129, -1672.058471, 5.613227, 272.017883, -1, -1,900);
Cars[Police] = CreateVehicle(596, 1585.189086, -1668.016113, 5.614768 ,268.647460, -1, -1,900);
new CarCheck = GetPlayerVehicleID(playerid);
if(strcmp(cmd, "/whatever", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new CarCheck = GetPlayerVehicleID(playerid);
if(IsAWhateverCar(CarCheck))
{
then do whatever
}
}
return 1;
}
|
Try putting new CarCheck = GetPlayerVehicleID(playerid); inside of your if statements(or in your functions) and not at the top... as such
Код:
if(strcmp(cmd, "/whatever", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new CarCheck = GetPlayerVehicleID(playerid);
if(IsAWhateverCar(CarCheck))
{
then do whatever
}
}
return 1;
}
|
Although that code might help.. Ill check it later xD