public OnPlayerCommandText(playerid, cmdtext[]){ dcmd(gotoxyz, 7, cmdtext); return 0;}dcmd_gotoxyz(playerid, params[]){ new Float:x, Float:y, Float:z; if(sscanf(params, \"fff\", x, y, z)) SendClientMessage(playerid, 0xFF0000AA, \"Usage: /gotoxyz <x> <y> <z>\"); else { SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, 0xFF0000AA, \"Elteleportáltál!\"); } return 1;}
SetPlayerPos(playerid, x, y, z);
public OnPlayerCommandText(playerid, cmdtext[]){ dcmd(gotoxyz, 7, cmdtext); return 0;}dcmd_gotoxyz(playerid, params[]){ new Float:x, Float:y, Float:z; if(sscanf(params, \"fff\", x, y, z)) SendClientMessage(playerid, 0xFF0000AA, \"Usage: /gotoxyz <x> <y> <z>\"); { SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, 0xFF0000AA, \"Elteleportáltál!\"); } return 1;}
így nézd meg: public OnPlayerCommandText(playerid, cmdtext[]){ dcmd(gotoxyz, 7, cmdtext); return 0;}dcmd_gotoxyz(playerid, params[]){ new Float:x, Float:y, Float:z; if(sscanf(params, \"fff\", x, y, z)) SendClientMessage(playerid, 0xFF0000AA, \"Usage: /gotoxyz <x> <y> <z>\"); { SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, 0xFF0000AA, \"Elteleportáltál!\"); } return 1;}
public OnPlayerCommandText(playerid, cmdtext[]){ dcmd(gotoxyz, 7, cmdtext); return 0;}dcmd_gotoxyz(playerid, params[]){ new Float:x, Float:y, Float:z; if(sscanf(params, \"fff\", x, y, z)) return SendClientMessage(playerid, 0xFF0000AA, \"Usage: /gotoxyz <x> <y> <z>\"); SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, 0xFF0000AA, \"Elteleportáltál!\"); return 1;}
public OnPlayerCommandText(playerid, cmdtext[]){ dcmd(gotoxyz, 7, cmdtext); return 0;}dcmd_gotoxyz(playerid, params[]){ new Float:x, Float:y, Float:z; if(!sscanf(params, \"fff\", x, y, z)) return SendClientMessage(playerid, 0xFF0000AA, \"Usage: /gotoxyz <x> <y> <z>\"); SetPlayerPos(playerid, x, y, z); SendClientMessage(playerid, 0xFF0000AA, \"Elteleportáltál!\"); return 1;}
// 0.0,0.0,0.0 <- írd át a koordinátákatCMD:hazam(playerid, params[]) // Parancs, pl. /hazam { if(IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(GetPlayerVehicleID(playerid),0.0,0.0,0.0); // Teleportálás helye jármûvel (jármûvel ide teleportál). } else { // Ellenkezoleg (azaz ha nincs jármuben) SetPlayerPos(playerid,0.0,0.0,0.0); // Teleportálás helye jármû nélkül (gyalogosan ide teleportál). } return 1;}
public OnPlayerCommandText(playerid, cmdtext[]){ dcmd(gotopos, 7, cmdtext); return 0;} dcmd_gotopos(playerid,params[]){new Float: X,Float:Y,Float:Z;if(sscanf(params,\"fff\",X,Y,Z)) return SendClientMessage(playerid,-1,\"Használat: /gotopos [X] [Y] [Z]);SetPlayerPos(playerid,X,Y,Z);return 1;}
CMD:gotopos(playerid,params[])
if(sscanf(params,\"fff\",X,Y,Z)) return SendClientMessage(playerid,-1,\"Használat: /gotopos [X] [Y] [Z] )\";