SA-MP Forums Archive
Help about Auto LicensePlate - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help about Auto LicensePlate (/showthread.php?tid=394927)



Help about Auto LicensePlate - PRoleplay - 24.11.2012

i nid help for making autolicense plate for ex. when player log in all player vehicle will be automaticaly set vehicle platenumber to "XXX [vehicleID]"

here's my code onplayerconnect

PHP код:
    for(new 0MAX_PLAYERVEHICLESv++)
    {
        
PlayerVehicleInfo[playerid][v][pvModelId] = 0;
        
PlayerVehicleInfo[playerid][v][pvPosX] = 0.0;
        
PlayerVehicleInfo[playerid][v][pvPosY] = 0.0;
        
PlayerVehicleInfo[playerid][v][pvPosZ] = 0.0;
        
PlayerVehicleInfo[playerid][v][pvPosAngle] = 0.0;
        
PlayerVehicleInfo[playerid][v][pvLock] = 0;
        
PlayerVehicleInfo[playerid][v][pvLocked] = 0;
        
PlayerVehicleInfo[playerid][v][pvPaintJob] = -1;
        
PlayerVehicleInfo[playerid][v][pvColor1] = 0;
        
PlayerVehicleInfo[playerid][v][pvImpounded] = 0;
        
PlayerVehicleInfo[playerid][v][pvColor2] = 0;
        
PlayerVehicleInfo[playerid][v][pvPrice] = 0;
        
PlayerVehicleInfo[playerid][v][pvTicket] = 0;
        
PlayerVehicleInfo[playerid][v][pvWeapons][0] = 0;
        
PlayerVehicleInfo[playerid][v][pvWeapons][1] = 0;
        
PlayerVehicleInfo[playerid][v][pvWeapons][2] = 0;
        
PlayerVehicleInfo[playerid][v][pvWepUpgrade] = 0;
        
PlayerVehicleInfo[playerid][v][pvFuel] = 100.0;
        
strcpy(PlayerVehicleInfo[playerid][v][pvAllowPlayer], "No-ne"MAX_PLAYER_NAME);
        
PlayerVehicleInfo[playerid][v][pvAllowedPlayerId] = INVALID_PLAYER_ID;
        
PlayerVehicleInfo[playerid][v][pvPark] = 0;
        
ListItemReleaseId[playerid][v] = -1;
        
ListItemTrackId[playerid][v] = -1;
   
        for(new 
0MAX_MODSm++)
        {
            
PlayerVehicleInfo[playerid][v][pvMods][m] = 0;
        }
    } 
thanks in advance
sorry for my bad english


Re: Help about Auto LicensePlate - dr.lozer - 24.11.2012

a little explain please?


Re : Help about Auto LicensePlate - PRoleplay - 24.11.2012

a code or script for making a automated Vehicle Plate number
example, when i log in to the server and i got infernus
instead of "XYZ 0000" my infernus plate number will automatically set the plate number to "XXX [VehicleID]"


Re: Help about Auto LicensePlate - Richie© - 24.11.2012

Just put SetVehicleNumberPlate in there


Re : Help about Auto LicensePlate - PRoleplay - 24.11.2012

heres my code for onplayer login
loop for vehicle
PHP код:
    for(new 0MAX_PLAYERVEHICLESv++)
                    {
                        
format(string128"pv%dPosX",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvPosX] = floatstrval ); }
                        
format(string128"pv%dPosY",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvPosY] = floatstrval ); }
                        
format(string128"pv%dPosZ",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvPosZ] = floatstrval ); }
                        
format(string128"pv%dPosAngle",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvPosAngle] = floatstrval ); }
                        
format(string128"pv%dModelId",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvModelId] = strvalval ); }
                        
format(string128"pv%dLock",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvLock] = strvalval ); }
                        
format(string128"pv%dLocked",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvLocked] = strvalval ); }
                        
format(string128"pv%dPaintJob",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvPaintJob] = strvalval ); }
                        
format(string128"pv%dColor1",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvColor1] = strvalval ); }
                        
format(string128"pv%dColor2",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvColor2] = strvalval ); }
                        
format(string128"pv%dPrice",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvPrice] = strvalval ); }
                        
format(string128"pv%dTicket",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvTicket] = strvalval ); }
                        
format(string128"pv%dWeapon0",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvWeapons][0] = strvalval ); }
                        
format(string128"pv%dWeapon1",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvWeapons][1] = strvalval ); }
                        
format(string128"pv%dWeapon2",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvWeapons][2] = strvalval ); }
                        
format(string128"pv%dWepUpgrade",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvWepUpgrade] = strvalval ); }
                        
format(string128"pv%dFuel",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvFuel] = floatstrval ); }
                        
format(string128"pv%dImpound",v);
                        if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvImpounded] = strvalval ); }
                        
                        for(new 
0MAX_MODSm++)
                        {
                            
format(string128"pv%dMod%d"vm);
                            if( 
strcmpkey string true ) == ) { val ini_GetValueData ); PlayerVehicleInfo[playerid][v][pvMods][m] = strvalval ); }
                        }
                       
                    } 



Re : Help about Auto LicensePlate - PRoleplay - 25.11.2012

up...


Re : Help about Auto LicensePlate - PRoleplay - 25.11.2012

up again


Re: Help about Auto LicensePlate - maramizo - 25.11.2012

Stop using NGRP script, seriously.