Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(xgoto, 5, cmdtext);
- и в самый низ
- dcmd_xgoto(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:x, Float:y, Float:z;new string[100];
- if(sscanf(params, "fff", x, y, z))
- SendClientMessage(playerid, 0xFF0000AA, "Используйте: /xgoto <X число> <Y число> <Z число>");
- else
- {
- if(IsPlayerInAnyVehicle(playerid)){SetVehiclePos(GetPlayerVehicleID(playerid), x,y,z);}
- else{SetPlayerPos(playerid, x, y, z);}
- format(string, sizeof(string), "Вы телепортировались по координатам %f, %f, %f", x, y, z);SendClientMessage(playerid, 0xBBBBBBAA, string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement