Script

Image

Des scripts seront déposés ici, tenez  certains :

casque : 

if(!strcmp(cmdtext"/casque"true))
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
gPlayerLogged[playerid] == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"Vous devez être authentifié! ");
                return 
1;
            }
            if(
IsPlayerInAnyVehicle(playerid))
            {
                new 
carid GetPlayerVehicleID(playerid);
                new 
vehmod GetVehicleModel(carid);
                if(!
IsABike(carid) && !IsAOBike(carid) && vehmod != 509 && vehmod != 481 && vehmod != 510 && vehmod != 462 && !IsAPizzabike(carid))
                {
                    
SendClientMessage(playeridCOLOR_GREY"Vous pouvez pas mettre de casque dans ce véhicule");
                    return 
1;
                }
                if(
casque[playerid] == 0)
                {
                    
casque[playerid] = 1;
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                      
format(stringsizeof(string), "* %s met son casque."sendername);
                      
SetPlayerAttachedObject(playerid11864520.070088750);
                      
SendClientMessage(playerid,COLOR_BLANC" Refaite /casque pour enlever le casque");
                      
ProxDetector(30.0playeridstringCOLOR_PURPLE);
                      return 
1;
                }
                else if(
casque[playerid] == 1)
                {
                    
casque[playerid] = 0;
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                      
format(stringsizeof(string), "* %s enleve son casque."sendername);
                      
RemovePlayerAttachedObject(playerid1);
                      
ProxDetector(30.0playeridstringCOLOR_PURPLE);
                      return 
1;
                }
                return 
1;
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"Vous devez être dans un véhicule pour pouvoir utiliser cette commande!");
                return 
1;
            }
        }
        return 
1;
    } 

sur les voitures : ( police ou non )

if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
            new objectid = CreateObject(19419, 0, 0, 0, 0, 0, 0);
        AttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000); 
        SendClientMessage(playerid, COLOR_RED, "Vous Avez Mit une sirène a votre véhicule");
        return 1;
    }