pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
#if defined DEBUG
printf("[debug] OnVehicleMod(%d, %d, %d)", playerid, vehicleid, componentid);
#endif
if(GetPlayerInterior(playerid) < 1 && GetPlayerInterior(playerid) > 3) {
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "AdmWarn: {FFFFFF}%s may possibly be hacking vehicle mods (added component %d to their %s).", szPlayerName, componentid, VehicleNames[GetVehicleModel(vehicleid) - 400]);
submitToHelpersAndAdmins(szMessage, COLOR_HOTORANGE);
}
else if(GetPlayerInterior(playerid) >= 1 && GetPlayerInterior(playerid) <= 3) {
switch(componentid) { // Get the price for the vehicle component, only if they're in a mod garage.
case 1024: playerVariables[playerid][pMoney] -= 50;
case 1006: playerVariables[playerid][pMoney] -= 80;
case 1004, 1145, 1013, 1091, 1086: playerVariables[playerid][pMoney] -= 100;
case 1005, 1143, 1022, 1035, 1088: playerVariables[playerid][pMoney] -= 150;
case 1021, 1009, 1002, 1016, 1068, 1153: playerVariables[playerid][pMoney] -= 200;
case 1011: playerVariables[playerid][pMoney] -= 220;
case 1012, 1020, 1003, 1067: playerVariables[playerid][pMoney] -= 250;
case 1019: playerVariables[playerid][pMoney] -= 300;
case 1018, 1023, 1093: playerVariables[playerid][pMoney] -= 350;
case 1014, 1000: playerVariables[playerid][pMoney] -= 400;
case 1163, 1090, 1070: playerVariables[playerid][pMoney] -= 450;
case 1008, 1007, 1017, 1015, 1044, 1043, 1036: playerVariables[playerid][pMoney] -= 500;
case 1045: playerVariables[playerid][pMoney] -= 510;
case 1001, 1158, 1069, 1164: playerVariables[playerid][pMoney] -= 550;
case 1050, 1058, 1097: playerVariables[playerid][pMoney] -= 620;
case 1162, 1089: playerVariables[playerid][pMoney] -= 650;
case 1028, 1085: playerVariables[playerid][pMoney] -= 770;
case 1122, 1106, 1108, 1118: playerVariables[playerid][pMoney] -= 780;
case 1134: playerVariables[playerid][pMoney] -= 800;
case 1082: playerVariables[playerid][pMoney] -= 820;
case 1064, 1133: playerVariables[playerid][pMoney] -= 830;
case 1165, 1167, 1065: playerVariables[playerid][pMoney] -= 850;
case 1175, 1177, 1172, 1080: playerVariables[playerid][pMoney] -= 900;
case 1100, 1119, 1192: playerVariables[playerid][pMoney] -= 940;
case 1173, 1161, 1166, 1168: playerVariables[playerid][pMoney] -= 950;
case 1010, 1149, 1176, 1042, 1136, 1025, 1096, 1174: playerVariables[playerid][pMoney] -= 1000;
case 1155, 1154: playerVariables[playerid][pMoney] -= 1030;
case 1160, 1159: playerVariables[playerid][pMoney] -= 1050;
case 1150: playerVariables[playerid][pMoney] -= 1090;
case 1193, 1073: playerVariables[playerid][pMoney] -= 1100;
case 1190, 1078: playerVariables[playerid][pMoney] -= 1200;
case 1135, 1087: playerVariables[playerid][pMoney] -= 1500;
case 1083, 1076: playerVariables[playerid][pMoney] -= 1560;
case 1179, 1184: playerVariables[playerid][pMoney] -= 2150;
case 1046: playerVariables[playerid][pMoney] -= 710;
case 1152: playerVariables[playerid][pMoney] -= 910;
case 1151: playerVariables[playerid][pMoney] -= 840;
case 1054: playerVariables[playerid][pMoney] -= 210;
case 1053: playerVariables[playerid][pMoney] -= 130;
case 1049: playerVariables[playerid][pMoney] -= 810;
case 1047: playerVariables[playerid][pMoney] -= 670;
case 1048: playerVariables[playerid][pMoney] -= 530;
case 1066: playerVariables[playerid][pMoney] -= 750;
case 1034: playerVariables[playerid][pMoney] -= 790;
case 1037: playerVariables[playerid][pMoney] -= 690;
case 1171: playerVariables[playerid][pMoney] -= 990;
case 1148: playerVariables[playerid][pMoney] -= 890;
case 1038: playerVariables[playerid][pMoney] -= 190;
case 1146: playerVariables[playerid][pMoney] -= 490;
case 1039: playerVariables[playerid][pMoney] -= 390;
case 1059: playerVariables[playerid][pMoney] -= 720;
case 1157: playerVariables[playerid][pMoney] -= 930;
case 1156: playerVariables[playerid][pMoney] -= 920;
case 1055: playerVariables[playerid][pMoney] -= 230;
case 1061: playerVariables[playerid][pMoney] -= 180;
case 1060: playerVariables[playerid][pMoney] -= 530;
case 1056: playerVariables[playerid][pMoney] -= 520;
case 1057: playerVariables[playerid][pMoney] -= 430;
case 1029: playerVariables[playerid][pMoney] -= 680;
case 1169: playerVariables[playerid][pMoney] -= 970;
case 1170: playerVariables[playerid][pMoney] -= 880;
case 1141: playerVariables[playerid][pMoney] -= 980;
case 1140: playerVariables[playerid][pMoney] -= 870;
case 1032: playerVariables[playerid][pMoney] -= 170;
case 1033: playerVariables[playerid][pMoney] -= 120;
case 1138: playerVariables[playerid][pMoney] -= 580;
case 1139: playerVariables[playerid][pMoney] -= 470;
case 1026: playerVariables[playerid][pMoney] -= 480;
case 1031: playerVariables[playerid][pMoney] -= 370;
case 1092: playerVariables[playerid][pMoney] -= 750;
case 1128: playerVariables[playerid][pMoney] -= 3340;
case 1103: playerVariables[playerid][pMoney] -= 3250;
case 1183: playerVariables[playerid][pMoney] -= 2040;
case 1182: playerVariables[playerid][pMoney] -= 2130;
case 1181: playerVariables[playerid][pMoney] -= 2050;
case 1104: playerVariables[playerid][pMoney] -= 1610;
case 1105: playerVariables[playerid][pMoney] -= 1540;
case 1126: playerVariables[playerid][pMoney] -= 3340;
case 1127: playerVariables[playerid][pMoney] -= 3250;
case 1185: playerVariables[playerid][pMoney] -= 2040;
case 1180: playerVariables[playerid][pMoney] -= 2130;
case 1178: playerVariables[playerid][pMoney] -= 2050;
case 1123: playerVariables[playerid][pMoney] -= 860;
case 1125: playerVariables[playerid][pMoney] -= 1120;
case 1130: playerVariables[playerid][pMoney] -= 3380;
case 1131: playerVariables[playerid][pMoney] -= 3290;
case 1189: playerVariables[playerid][pMoney] -= 2200;
case 1188: playerVariables[playerid][pMoney] -= 2080;
case 1187: playerVariables[playerid][pMoney] -= 2175;
case 1186: playerVariables[playerid][pMoney] -= 2095;
case 1129: playerVariables[playerid][pMoney] -= 1650;
case 1132: playerVariables[playerid][pMoney] -= 1590;
case 1113: playerVariables[playerid][pMoney] -= 3340;
case 1114: playerVariables[playerid][pMoney] -= 3250;
case 1117: playerVariables[playerid][pMoney] -= 2040;
case 1115: playerVariables[playerid][pMoney] -= 2130;
case 1116: playerVariables[playerid][pMoney] -= 2050;
case 1109: playerVariables[playerid][pMoney] -= 1610;
case 1110: playerVariables[playerid][pMoney] -= 1540;
case 1191: playerVariables[playerid][pMoney] -= 1040;
case 1079: playerVariables[playerid][pMoney] -= 1030;
case 1075: playerVariables[playerid][pMoney] -= 980;
case 1077: playerVariables[playerid][pMoney] -= 1620;
case 1074: playerVariables[playerid][pMoney] -= 1030;
case 1081: playerVariables[playerid][pMoney] -= 1230;
case 1084: playerVariables[playerid][pMoney] -= 1350;
case 1098: playerVariables[playerid][pMoney] -= 1140;
}
}
return 1;
}
THis is my OnVehicleMod function. I can't see what is wrong ?
pawn Код:
public OnEnterExitModShop(playerid, enterexit, interiorid) {
#if defined DEBUG
printf("[debug] OnEnterExitModShop(%d, %d, %d)", playerid, enterexit, interiorid);
#endif
if(enterexit == 0)
{
if(GetPVarInt(playerid, "pC") == 1)
{
playerVariables[playerid][pMoney] -= businessVariables[15][bEnterPrice];
businessVariables[15][bVault] += businessVariables[15][bEnterPrice];
DeletePVar(playerid, "pC");
}
foreach(Player, v)
{
if(GetPlayerVehicleID(playerid) == playerVariables[v][pCarID1])
{
for(new i = 0; i < 13; i++)
{
playerVariables[v][pCarMods1][i] = GetVehicleComponentInSlot(playerVariables[v][pCarID1], i);
}
}
if(GetPlayerVehicleID(playerid) == playerVariables[v][pCarID2])
{
for(new i = 0; i < 13; i++)
{
playerVariables[v][pCarMods2][i] = GetVehicleComponentInSlot(playerVariables[v][pCarID2], i);
}
}
if(GetPlayerVehicleID(playerid) == playerVariables[v][pCarID3])
{
for(new i = 0; i < 13; i++)
{
playerVariables[v][pCarMods3][i] = GetVehicleComponentInSlot(playerVariables[v][pCarID3], i);
}
}
if(GetPlayerVehicleID(playerid) == playerVariables[v][pCarID4])
{
for(new i = 0; i < 13; i++)
{
playerVariables[v][pCarMods4][i] = GetVehicleComponentInSlot(playerVariables[v][pCarID4], i);
}
}
}
}
}