Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #define dcmd(%1,%2,%3) if((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  2. public OnPlayerCommandText(playerid, cmdtext[])
  3. {
  4. dcmd(xgoto, 5, cmdtext);
  5. и в самый низ
  6. dcmd_xgoto(playerid, params[])
  7. {
  8. if(PlayerInfo[playerid][pAdmin] >= 1)
  9. {
  10. new Float:x, Float:y, Float:z;new string[100];
  11. if(sscanf(params, "fff", x, y, z))
  12. SendClientMessage(playerid, 0xFF0000AA, "Используйте: /xgoto <X число> <Y число> <Z число>");
  13. else
  14. {
  15. if(IsPlayerInAnyVehicle(playerid)){SetVehiclePos(GetPlayerVehicleID(playerid), x,y,z);}
  16. else{SetPlayerPos(playerid, x, y, z);}
  17. format(string, sizeof(string), "Вы телепортировались по координатам %f, %f, %f", x, y, z);SendClientMessage(playerid, 0xBBBBBBAA, string);
  18. }
  19. }
  20. return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement