Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDisconnect(playerid, reason)
- {
- if(IsValidDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh"))
- DestroyDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh"));
- return 1;
- }
- if(!strcmp(cmd, "/vob", true))
- {
- if(PlayerInfo[playerid][pAdmin] < 9) return SendClientMessage(playerid, 0xAFAFAFAA, "Вам недоступно");
- new vID, obID, offsets[3], rots[3];
- if(sscanf(params, "ddffffff", vID, obID, offsets[0], offsets[1], offsets[2], rots[0], rots[1], rots[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "Используйте: /vob [ID машины][ID объекта][offset X][offset Y][offset Z][rot X][rot Y][rot Z]");
- if(IsValidDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh")))
- {
- DestroyDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh"));
- SetPVarInt(playerid, "PlObjAtToVeh", 0);
- }
- SetPVarInt(playerid, "PlObjAtToVeh", CreateDynamicObject(obID, offsets[0], offsets[1], offsets[2], rots[0], rots[1], rots[2]));
- AttachDynamicObjectToVehicle(GetPVarInt(playerid, "PlObjAtToVeh"), vID, offsets[0], offsets[1], offsets[2], rots[0], rots[1], rots[2]);
- return 1;
- }
- if(!strcmp(cmd, "/delvob", true))
- {
- if(PlayerInfo[playerid][pAdmin] < 9) return SendClientMessage(playerid, 0xAFAFAFAA, "Вам недоступно");
- if(IsValidDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh")))
- {
- DestroyDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh"));
- SetPVarInt(playerid, "PlObjAtToVeh", 0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement