SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 24/10/2014, 07:52 PM   #1
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 461
Reputation: 9
Default [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

Can someone give me some Protection against invalid mods , and explain me how to install it on my gamemode?
Crash error for my players is : 0x007F0BF7
Thx. I rep ++
buburuzu19 is offline   Reply With Quote
Old 24/10/2014, 08:03 PM   #2
Alex Magaņa
High-roller
 
Alex Magaņa's Avatar
 
Join Date: Oct 2012
Location: 𝕭𝖗𝖔𝖙𝖍𝖊𝖗𝖍𝖔𝖔𝖉
Posts: 2,140
Reputation: 218
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

The best way to protect your server from invalid mods is to tell your friends to remove the mods that they got in GTA:SA.
There's no protection system or something like that.
__________________

HOME --- FORUMS --- DISCORD --- SERVER
SAMH: Prop Hunt server is coming soon!
Alex Magaņa is offline   Reply With Quote
Old 24/10/2014, 08:24 PM   #3
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 461
Reputation: 9
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

I have 500+ players, how can i told all to remove the mods?
buburuzu19 is offline   Reply With Quote
Old 24/10/2014, 08:26 PM   #4
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,140
Reputation: 445
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

I believe the error means invalid car mod, meaning a tuning modification. In this case, you'll have to verify all tuning is correct although I could be wrong.
Abagail is offline   Reply With Quote
Old 24/10/2014, 08:38 PM   #5
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 461
Reputation: 9
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

What to search for ? And how to check if the tunning part is good or not.
Give me an example pls.
buburuzu19 is offline   Reply With Quote
Old 24/10/2014, 08:45 PM   #6
Jefff
Banned
 
Join Date: Dec 2007
Posts: 2,594
Reputation: 326
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

http://wiki.sa-mp.com/wiki/OnVehicleMod
Jefff is offline   Reply With Quote
Old 24/10/2014, 08:50 PM   #7
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,140
Reputation: 445
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

You'd have to check. Typical car component/tuning models are 1000 to 1193. For example,

pawn Code:
#define MAX_CARMODS 14
new tmpslot;
for (new v = 0; v != MAX_VEHICLES; ++v)
{
    if(!IsVehicleValid(i)) continue;
        for (new i = 0; i != MAX_CARMODS; ++i)
        {
            if(i == 14) break;
            tmpslot = GetVehicleComponentInSlot(v, i);
            if(tmpslot < 1000 || tmpslot > 1193)
            RemoveVehicleComponent(v, tmpslot);
        }
}

Maybe call this when a vehicle spawns, or is streamed in.
Abagail is offline   Reply With Quote
Old 24/10/2014, 09:18 PM   #8
Evocator
Huge Clucker
 
Join Date: Nov 2013
Posts: 459
Reputation: 153
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

http://forum.sa-mp.com/showthread.php?t=317303
Evocator is offline   Reply With Quote
Old 25/10/2014, 07:20 AM   #9
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 461
Reputation: 9
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

pawn Code:
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 Code:
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);
                }
            }
        }
    }
}
buburuzu19 is offline   Reply With Quote
Old 25/10/2014, 11:05 AM   #10
buburuzu19
Huge Clucker
 
buburuzu19's Avatar
 
Join Date: Apr 2013
Location: 127.0.0.1
Posts: 461
Reputation: 9
Default Re: [0x007F0BF7]My players are getting crashed by the other car player mods. REP ++

HELP PLEASE , MY PLAYERS ARE GETTING CRASHED!!!
buburuzu19 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Player get crashed after spawn ? [D]ry[D]esert Scripting Help 3 14/07/2013 07:36 PM
Player get crashed after some time Swimor Client Support 2 22/06/2013 10:19 AM
Player's getting crashed Black Wolf Server Support 9 31/10/2012 01:12 PM
Server crashed by a player uPeppe Scripting Help 2 15/10/2011 03:55 PM
Server crashed on player log in Big_Duck Help Archive 6 10/04/2009 03:06 PM


All times are GMT. The time now is 07:06 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.