Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @_ Pequena include GetVehicleColor Criada por SuYaNw Dácio.
- @_ Blog: www.ips-team.blogspot.com
- @_ MSN: [email protected]
- */
- #if !defined _samp_included
- #tryinclude a_samp
- #endif
- #if !defined _samp_included
- #error The include a_samp now exists!
- #endif
- enum enumerador_ips
- {
- Cor1, Cor2
- };
- static stock
- iPs_Cars[MAX_VEHICLES][enumerador_ips]
- ;
- static stock iPs_CreateVehicle(modelid, Float:_ips_X,Float:_ips_Y,Float:_ips_Z, Float:_ips_A, COR1, COR2, respawndelay = 0)
- {
- static tempveh;
- tempveh = CreateVehicle(modelid, _ips_X,_ips_Y,_ips_Z, _ips_A, COR1, COR2, respawndelay);
- iPs_Cars[tempveh][Cor1] = COR1;
- iPs_Cars[tempveh][Cor2] = COR2;
- return 1;
- }
- static stock iPs_GetVehicleColor(vehicleid, ncolor)
- {
- if(ncolor > 2 || ncolor < 0)
- return printf("WARNING: INVALID_COLOR_ID - (COR:%i)", ncolor);
- if(!ncolor) return iPs_Cars[vehicleid][Cor1];
- if(ncolor) return iPs_Cars[vehicleid][Cor2];
- return 0;
- }
- /*
- Tutorial para utilizar:
- Subistitua todos os CreateVehicle por iPs_CreateVehicle.
- Exemplo de uso:
- if(!strcmp(cmdtext,"/ips", true))
- {
- new veh = 0;
- new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z);
- veh = iPs_CreateVehicle(522,x,y,z,0.0, 11, 6, 1000);
- new id = iPs_GetVehicleColor(veh, 0);
- printf("Cor 1 do veiculo é : %d", id);
- id = iPs_GetVehicleColor(veh, 1);
- printf("Cor 2 do veiculo é : %d", id)
- return 1;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment