new
bool:PortPovoleny,
PortSuradnice[3];
public OnPlayerCommandText(playerid, cmdtext[]) {
if (!strcmp("/prikaz", cmdtext)) {
if (PortPovoleny) {
//Ak je zapnutý port
SetPlayerPos(playerid, PortSuradnice[0], PortSuradnice[1], PortSuradnice[2]);
}
else {
SendClientMessage(playerid, -1, "Port je vypnutý!");
}
return 1;
}
if (!strcmp("/portovladanie", cmdtext)) {
if (!PortPovoleny) {
PortPovoleny = true;
}
else {
PortPovoleny = false;
}
return 1;
}
if (!strcmp("/nastavport", cmdtext)) {
GetPlayerPos(playerid, PortSuradnice[0], PortSuradnice[1], PortSuradnice[2]);
return 1;
}
return 0;
}