Advertisement
Splav

Untitled

Jun 11th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.32 KB | None | 0 0
  1. if(!strcmp(cmd, "/vob", true))
  2.     {
  3.         if(PlayerInfo[playerid][pAdmin] < 9) return SendClientMessage(playerid, 0xAFAFAFAA, "Вам недоступно");
  4.  
  5.         new vID, obID, offsets[3], rots[3];
  6.         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]");
  7.  
  8.         if(IsValidDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh")))
  9.         {
  10.             DestroyDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh"));
  11.             SetPVarInt(playerid, "PlObjAtToVeh", 0);
  12.         }
  13.        
  14.         SetPVarInt(playerid, "PlObjAtToVeh", CreateDynamicObject(obID, offsets[0], offsets[1], offsets[2], rots[0], rots[1], rots[2]));
  15.         AttachDynamicObjectToVehicle(GetPVarInt(playerid, "PlObjAtToVeh"), vID, offsets[0], offsets[1], offsets[2], rots[0], rots[1], rots[2]);
  16.        
  17.         return 1;
  18.     }
  19.    
  20.     if(!strcmp(cmd, "/delvob", true))
  21.     {
  22.         if(PlayerInfo[playerid][pAdmin] < 9) return SendClientMessage(playerid, 0xAFAFAFAA, "Вам недоступно");
  23.  
  24.         if(IsValidDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh")))
  25.         {
  26.             DestroyDynamicObject(GetPVarInt(playerid, "PlObjAtToVeh"));
  27.             SetPVarInt(playerid, "PlObjAtToVeh", 0);
  28.         }
  29.         return 1;
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement