Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- native IsValidVehicle(vehicleid);
- stock GetVehicleInfo(vehicleid, infotype, &Float:x, &Float:y, &Float:z, &Float:angle) // by Kar
- {
- if(!IsValidVehicle(vehicleid)) return 0;
- new Float:mX, Float:mY, Float:mZ;
- GetVehicleModelInfo(GetVehicleModel(vehicleid), infotype, mX, mY, mZ);
- z += mZ;
- x += (mY * floatsin(-angle, degrees));
- y += (mY * floatcos(-angle, degrees));
- angle += 270.0;
- x += (mX * floatsin(-angle, degrees));
- y += (mX * floatcos(-angle, degrees));
- angle -= 270.0;
- return 1;
- }
- // PAVYZDYS
- COMMAND:cap(playerid)
- {
- new Float:Pos[4];
- for(new v = 0; v < MAX_VEHICLES; v++)
- {
- GetVehiclePos(v, Pos[0], Pos[1], Pos[2]); GetVehicleZAngle(v, Pos[3]);
- GetVehicleInfo(v, VEHICLE_MODEL_INFO_PETROLCAP, Pos[0], Pos[1], Pos[2], Pos[3]);
- if(IsPlayerInRangeOfPoint(playerid, 1.0, Pos[0], Pos[1], Pos[2]))
- {
- return SendClientMessage(playerid, -1, " - Esate šalia transp. priem. kuro bako");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement